Add indentation settings for vi* and *Emacs, use -tt, untabify.

git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1110 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
Ville Skyttä 2006-04-01 08:09:17 +00:00
parent b297c3736a
commit c79d60297b
26 changed files with 172 additions and 20 deletions

View File

@ -18,3 +18,9 @@ class AbstractCheck:
raise NotImplementedError('check must be implemented in subclass')
# AbstractCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -344,3 +344,9 @@ any binaries.''',
)
# BinariesCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -680,3 +680,9 @@ def load_policy(policy):
STANDARD_USERS = STANDARD_USERS_OLD
# Config.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -73,3 +73,9 @@ A way to resolve this is to put the following in your SPEC file:
)
# ConfigCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -90,4 +90,11 @@ run gzip <info page file> to gzip it in the %install section and rebuild the
package.''',
)
# DistributionCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -1,14 +1,14 @@
# Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@ -33,12 +33,12 @@ def _stripVersionedDeps(deps):
class DocFilesCheck(AbstractCheck.AbstractCheck):
def __init__(self):
AbstractCheck.AbstractCheck.__init__(self, 'DocFilesCheck')
AbstractCheck.AbstractCheck.__init__(self, 'DocFilesCheck')
def __checkRequirements(this, pkg):
file_reqs = pkg.header[rpm.RPMTAG_FILEREQUIRE]
files = pkg.header[rpm.RPMTAG_FILENAMES]
doc_files = pkg.docFiles()
doc_files = pkg.docFiles()
assert(len(file_reqs) == len(files))
@ -48,8 +48,8 @@ class DocFilesCheck(AbstractCheck.AbstractCheck):
tmp = _stripVersionedDeps(tmp)
reqs[files[i]] = tmp
core_reqs = {} # dependencies of non-doc files
doc_reqs = {} # dependencies of doc files
core_reqs = {} # dependencies of non-doc files
doc_reqs = {} # dependencies of doc files
for dep in pkg.header.dsFromHeader():
# skip deps which were found by find-requires
@ -61,7 +61,7 @@ class DocFilesCheck(AbstractCheck.AbstractCheck):
core_reqs[i] = []
for i in files:
if not reqs[i]: continue # skip empty dependencies
if not reqs[i]: continue # skip empty dependencies
elif i in doc_files: target = doc_reqs
else: target = core_reqs
@ -79,8 +79,8 @@ class DocFilesCheck(AbstractCheck.AbstractCheck):
printWarning(pkg, "doc-file-dependency", f, dep)
def check(self, pkg):
if pkg.isSource():
return
if pkg.isSource():
return
try:
foo = rpm.RPMTAG_FILEREQUIRE # need rpm >= 4.1.1
except:
@ -109,3 +109,11 @@ def test():
(['a','>', '0', 'b', '>', '0'], ['a', 'b']),
):
assert(_stripVersionedDeps(arg) == exp)
# DocFilesCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -89,4 +89,11 @@ directories are:
-ftp
""",
)
# FHSCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -5,7 +5,7 @@
# Created on : Mon Oct 4 19:32:49 1999
# Version : $Id$
# Purpose : test various aspects on files: locations, owner, groups,
# permission, setuid, setgid...
# permission, setuid, setgid...
#############################################################################
from Filter import *
@ -897,3 +897,9 @@ option MetaPackageRegexp.''',
)
# FilesCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -50,3 +50,9 @@ def addDetails(*details):
_details[details[idx*2]]=details[idx*2+1]
# Filter.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -199,3 +199,9 @@ if Config.info:
)
# I18NCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -169,4 +169,11 @@ of chkconfig don't work as expected with init script names like that.''',
'''The init script should have at least the execution bit set for root
in order for it to run at boot time.''',
)
# InitScriptCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -53,4 +53,11 @@ lowercase letters and/or numbers.""",
lowercase letters and/or numbers.""",
)
# LSBCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -430,3 +430,9 @@ sizes of the icon from being found.''',
)
# MenuCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -116,5 +116,10 @@ check.add_check('ocaml', '^ocaml-', '/usr/lib/ocaml/', 1)
# ruby => apache2-mod_ruby
# ruby
# NamingPolicyCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

8
Pkg.py
View File

@ -5,7 +5,7 @@
# Created on : Tue Sep 28 07:18:06 1999
# Version : $Id$
# Purpose : provide an API to handle a rpm package either by accessing
# the rpm file or by accessing the files contained inside.
# the rpm file or by accessing the files contained inside.
#############################################################################
import os
@ -448,3 +448,9 @@ if __name__ == '__main__':
pkg.cleanup()
# Pkg.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -232,3 +232,9 @@ well as allows rpm to automatically mark the dependency on your command.''',
)
# PostCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -49,3 +49,9 @@ See the rpm --import option for more information.''',
)
# SignatureCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -74,4 +74,11 @@ have the .gz extension). To gzip it, use the gzip command.''',
permissions. Usually, a file should have 0644 permissions.''',
)
# SourceCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -311,3 +311,9 @@ You should use Requires(pre) and Requires(post) instead.''',
)
# SpecCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -893,3 +893,9 @@ once.''',
)
# TagsCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -98,3 +98,9 @@ in some situations.''',
)
# ZipCheck.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python -tt
#---------------------------------------------------------------
# Project : Mandriva Linux
# Module : rpmlint
@ -44,3 +44,9 @@ while idx:
del db
# check-install ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -1,4 +1,4 @@
#!/usr/bin/python -O
#!/usr/bin/python -O -tt
#############################################################################
# File : compile.py
# Package : rpmlint
@ -15,3 +15,9 @@ for f in sys.argv[2:]:
py_compile.compile(f, f + 'o', sys.argv[1] + f)
# compile.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python -tt
#---------------------------------------------------------------
# Project : Mandriva Linux
# Module : rpmlint
@ -161,7 +161,9 @@ if __name__ == '__main__':
main()
# rpmdiff ends here
#
# Local variables:
# mode: python
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et

View File

@ -13,6 +13,6 @@ PYTHONPATH=${PYTHONPATH=.}
PYTHONPATH=${PYTHONPATH}:/usr/share/rpmlint
exec python -u -O /usr/share/rpmlint/rpmlint.py $*
exec python -tt -u -O /usr/share/rpmlint/rpmlint.py $*
# rpmlint ends here

View File

@ -5,7 +5,7 @@
# Created on : Mon Sep 27 19:20:18 1999
# Version : $Id$
# Purpose : main entry point: process options, load the checks and run
# the checks.
# the checks.
#############################################################################
import sys
@ -248,3 +248,9 @@ else:
main()
# rpmlint.py ends here
# Local variables:
# indent-tabs-mode: nil
# py-indent-offset: 4
# End:
# ex: ts=4 sw=4 et