It was a rather generic name for a file. More importantly, it prevented the use of ctags in this projects since ctags creates a file named 'tags' by default for storing its information. Signed-off-by: Dan McGee <dan@archlinux.org> --- README | 10 ++++---- namcap-tags | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ namcap.py | 2 +- setup.py | 2 +- tags | 65 ------------------------------------------------------ tests/tags-check | 4 +- 6 files changed, 74 insertions(+), 74 deletions(-) create mode 100644 namcap-tags delete mode 100644 tags diff --git a/README b/README index c41eaa0..9586752 100644 --- a/README +++ b/README @@ -126,17 +126,17 @@ that each namcap module must have: Each member of these tag lists should be a tuple consisting of two components: the short, hyphenated form of the tag with the appropriate format specifiers (%s, etc.) The first word of this string must be the tag - name. The human readable form of the tag should be put in the tags file. - The format of the tags file is described below; and the parameters which - should replace the format specifier tokens in the final output. + name. The human readable form of the tag should be put in the namcap-tags + file. The format of the tags file is described below; and the parameters + which should replace the format specifier tokens in the final output. * type(self) "pkgbuild" for a module processing PKGBUILDs "tarball" for a module processing a binary package file. -The tags file consists of lines specifying the human readable form of the -hyphenated tags used in the namcap code. A line beginning with a '#' is +The namcap-tags file consists of lines specifying the human readable form of +the hyphenated tags used in the namcap code. A line beginning with a '#' is treated as a comment. Otherwise the format of the file is: machine-parseable-tag %s :: This is machine parseable tag %s diff --git a/namcap-tags b/namcap-tags new file mode 100644 index 0000000..c6f170e --- /dev/null +++ b/namcap-tags @@ -0,0 +1,65 @@ +# namcap tags file +# The tags file consists of lines specifying the human readable form of the +# hyphenated tags used in the namcap code. A line beginning with a '#' is +# treated as a comment. Otherwise the format of the file is: +# +# machine-parseable-tag %s :: This is machine parseable tag %s +# +# Note that a double colon (::) is used to separate the hyphenated tag from the +# human readable description. + +backups-preceding-slashes :: Backup entries should not have preceding slashes +dangling-hardlink %s points to %s :: Hard link (%s) points to non-existing %s +dangling-symlink %s points to %s :: Symlink (%s) points to non-existing %s +dependency-already-satisfied %s :: Dependency included but already satisfied ('%s') +dependency-covered-by-link-dependence %s :: Dependency covered by dependencies from link dependence (%s) +dependency-detected-not-included %s :: Dependency detected and not included ('%s') +dependency-detected-not-included %s from files %s :: Dependency detected and not included (%s) from files %s +dependency-is-testing-release %s :: Dependency '%s' on your system is a testing release +dependency-not-needed %s :: Dependency included and not needed ('%s') +depends-by-namcap-sight depends=(%s) :: Depends as namcap sees them: depends=(%s) +directory-not-world-executable %s :: Directory (%s) does not have the world executable bit set. +elffile-not-in-allowed-dirs %s :: ELF file (%s) outside of a valid path. +empty-directory %s :: Directory (%s) is empty +extra-var-begins-without-underscore %s :: Non standard variable '%s' doesn't start with an underscore +file-in-non-standard-dir %s :: File (%s) exists in a non-standard directory. +file-not-world-readable %s :: File (%s) does not have the world readable bit set. +file-referred-in-startdir :: File referenced in $startdir outside of $startdir/src or $startdir/pkg +file-world-writable %s :: File (%s) has the world writable bit set. +gnome-mime-file %s :: File (%s) is an auto-generated GNOME mime file +hardlink-found %s points to %s :: Hard link (%s) found that points to %s +hicolor-icon-cache-not-updated :: The hicolor icon cache has not been updated even though there are files in /usr/share/icons/hicolor. Use gtk-update-icon-theme or xdg-icon-resource to update the icon cache. +improper-md5sum %s :: Improper md5sum: '%s' +incorrect-library-permissions %s :: Library (%s) does not have permission set to 644. +incorrect-permissions %s (%s/%s) :: File (%s) has %s/%s permissions. +info-dir-file-present %s :: Info directory file (%s) needs removed. +insecure-rpath %s :: Insecure RPATH (%s). If present, RPATH should be only /usr/lib. +libtool-file-present %s :: File (%s) is a libtool file. +link-level-dependence %s on %s :: File '%s' link-level dependence on %s +mime-cache-not-updated :: Mime-file found. Add "update-mime-database usr/share/mime" to the install file +missing-contributor :: Missing Contributor tag +missing-custom-license-dir usr/share/licenses/%s :: Missing custom license directory (usr/share/licenses/%s) +missing-custom-license-file usr/share/licenses/%s/* :: Missing custom license file in package (usr/share/licenses/%s/*) +missing-license :: Missing license +missing-maintainer :: Missing Maintainer tag +missing-md5sums :: Missing md5sums +missing-url :: Missing url +non-fhs-info-page %s :: Non-FHS info page (%s) found. Use /usr/share/info instead +non-fhs-man-page %s :: Non-FHS man page (%s) found. Use /usr/share/man instead +not-a-common-license %s :: %s is not a common license (it's not in /usr/share/licenses/common/) +not-enough-md5sums %i needed :: Not enough md5sums: %i needed +package-name-in-uppercase :: No upper case letters in package names +perllocal-pod-present %s :: perllocal.pod found in %s. +pkgname-in-description :: Description should not contain the package name. +potential-non-fhs-info-page %s :: Potential non-FHS info page (%s) found. +potential-non-fhs-man-page %s :: Potential non-FHS man page (%s) found. +recommend-use-pkgdir :: Recommend use of $pkgdir instead of $startdir/pkg +recommend-use-srcdir :: Recommend use of $srcdir instead of $startdir/src +script-link-detected %s in %s :: Script link detected (%s) in file %s +scrollkeeper-dir-exists %s :: Scrollkeeper directory exists (%s). Remember to not run scrollkeeper till post_{install,upgrade,remove}. +specific-host-type-used %s :: Reference to one of %s should be changed to $CARCH +specific-sourceforge-mirror :: Attempting to use specific sourceforge mirror, use downloads.sourceforge.net instead +symlink-found %s points to %s :: Symlink (%s) found that points to %s +too-many-md5sums %i needed :: Too Many md5sums: %i needed +using-dl-sourceforge :: Attempting to use dl sourceforge domain, use downloads.sourceforge.net instead +variable-not-array %s :: Variable %s is not an array. diff --git a/namcap.py b/namcap.py index 10cdc14..7a26c2d 100755 --- a/namcap.py +++ b/namcap.py @@ -66,7 +66,7 @@ def verify_package(filename): return 0 return tar -def process_tags(filename="/usr/share/namcap/tags"): +def process_tags(filename="/usr/share/namcap/namcap-tags"): tags = {} f = open(filename) for i in f.readlines(): diff --git a/setup.py b/setup.py index fdf6109..0280e04 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup DATAFILES = [('/usr/share/man/man1', ['namcap.1']), - ('/usr/share/namcap', ['tags']), + ('/usr/share/namcap', ['namcap-tags']), ('/usr/share/doc/namcap',['README','AUTHORS','TODO'])] setup(name="namcap", diff --git a/tags b/tags deleted file mode 100644 index c6f170e..0000000 --- a/tags +++ /dev/null @@ -1,65 +0,0 @@ -# namcap tags file -# The tags file consists of lines specifying the human readable form of the -# hyphenated tags used in the namcap code. A line beginning with a '#' is -# treated as a comment. Otherwise the format of the file is: -# -# machine-parseable-tag %s :: This is machine parseable tag %s -# -# Note that a double colon (::) is used to separate the hyphenated tag from the -# human readable description. - -backups-preceding-slashes :: Backup entries should not have preceding slashes -dangling-hardlink %s points to %s :: Hard link (%s) points to non-existing %s -dangling-symlink %s points to %s :: Symlink (%s) points to non-existing %s -dependency-already-satisfied %s :: Dependency included but already satisfied ('%s') -dependency-covered-by-link-dependence %s :: Dependency covered by dependencies from link dependence (%s) -dependency-detected-not-included %s :: Dependency detected and not included ('%s') -dependency-detected-not-included %s from files %s :: Dependency detected and not included (%s) from files %s -dependency-is-testing-release %s :: Dependency '%s' on your system is a testing release -dependency-not-needed %s :: Dependency included and not needed ('%s') -depends-by-namcap-sight depends=(%s) :: Depends as namcap sees them: depends=(%s) -directory-not-world-executable %s :: Directory (%s) does not have the world executable bit set. -elffile-not-in-allowed-dirs %s :: ELF file (%s) outside of a valid path. -empty-directory %s :: Directory (%s) is empty -extra-var-begins-without-underscore %s :: Non standard variable '%s' doesn't start with an underscore -file-in-non-standard-dir %s :: File (%s) exists in a non-standard directory. -file-not-world-readable %s :: File (%s) does not have the world readable bit set. -file-referred-in-startdir :: File referenced in $startdir outside of $startdir/src or $startdir/pkg -file-world-writable %s :: File (%s) has the world writable bit set. -gnome-mime-file %s :: File (%s) is an auto-generated GNOME mime file -hardlink-found %s points to %s :: Hard link (%s) found that points to %s -hicolor-icon-cache-not-updated :: The hicolor icon cache has not been updated even though there are files in /usr/share/icons/hicolor. Use gtk-update-icon-theme or xdg-icon-resource to update the icon cache. -improper-md5sum %s :: Improper md5sum: '%s' -incorrect-library-permissions %s :: Library (%s) does not have permission set to 644. -incorrect-permissions %s (%s/%s) :: File (%s) has %s/%s permissions. -info-dir-file-present %s :: Info directory file (%s) needs removed. -insecure-rpath %s :: Insecure RPATH (%s). If present, RPATH should be only /usr/lib. -libtool-file-present %s :: File (%s) is a libtool file. -link-level-dependence %s on %s :: File '%s' link-level dependence on %s -mime-cache-not-updated :: Mime-file found. Add "update-mime-database usr/share/mime" to the install file -missing-contributor :: Missing Contributor tag -missing-custom-license-dir usr/share/licenses/%s :: Missing custom license directory (usr/share/licenses/%s) -missing-custom-license-file usr/share/licenses/%s/* :: Missing custom license file in package (usr/share/licenses/%s/*) -missing-license :: Missing license -missing-maintainer :: Missing Maintainer tag -missing-md5sums :: Missing md5sums -missing-url :: Missing url -non-fhs-info-page %s :: Non-FHS info page (%s) found. Use /usr/share/info instead -non-fhs-man-page %s :: Non-FHS man page (%s) found. Use /usr/share/man instead -not-a-common-license %s :: %s is not a common license (it's not in /usr/share/licenses/common/) -not-enough-md5sums %i needed :: Not enough md5sums: %i needed -package-name-in-uppercase :: No upper case letters in package names -perllocal-pod-present %s :: perllocal.pod found in %s. -pkgname-in-description :: Description should not contain the package name. -potential-non-fhs-info-page %s :: Potential non-FHS info page (%s) found. -potential-non-fhs-man-page %s :: Potential non-FHS man page (%s) found. -recommend-use-pkgdir :: Recommend use of $pkgdir instead of $startdir/pkg -recommend-use-srcdir :: Recommend use of $srcdir instead of $startdir/src -script-link-detected %s in %s :: Script link detected (%s) in file %s -scrollkeeper-dir-exists %s :: Scrollkeeper directory exists (%s). Remember to not run scrollkeeper till post_{install,upgrade,remove}. -specific-host-type-used %s :: Reference to one of %s should be changed to $CARCH -specific-sourceforge-mirror :: Attempting to use specific sourceforge mirror, use downloads.sourceforge.net instead -symlink-found %s points to %s :: Symlink (%s) found that points to %s -too-many-md5sums %i needed :: Too Many md5sums: %i needed -using-dl-sourceforge :: Attempting to use dl sourceforge domain, use downloads.sourceforge.net instead -variable-not-array %s :: Variable %s is not an array. diff --git a/tests/tags-check b/tests/tags-check index 31619e8..8392c2c 100755 --- a/tests/tags-check +++ b/tests/tags-check @@ -18,7 +18,7 @@ def process_tags(file): tags.add(i.split('::')[0].strip()) return tags -tagpath = '../tags' +tagpath = '../namcap-tags' basepath = '../Namcap' modules = filter(lambda s: s.endswith('.py'), os.listdir(basepath)) tags = process_tags(tagpath) @@ -38,7 +38,7 @@ for m in modules: if tags_in_modules - tags != set([]): print "Some tags are defined in the modules" - print "but not in the 'tags' file" + print "but not in the 'namcap-tags' file" print "\n".join(map(lambda s: " %s (in %s)" % (s, tags_by_file[s]), list(tags_in_modules - tags))) sys.exit(1) -- 1.6.4.4