Commit Graph

36 Commits

Author SHA1 Message Date
Ville Skyttä 543a05f084 flake8 cleanups 2015-07-09 16:43:44 +03:00
Miro Hrončok 6ee3c37df3 Run all check_specs method for all enabled checks, separate check_binary and check_source 2015-07-09 16:43:43 +03:00
Ville Skyttä 28ca788345 Python 3 compatibility tweaks 2015-07-09 16:43:43 +03:00
Ville Skyttä 717ff0fcf6 Python 3 compatibility tweaks. 2015-07-09 16:43:43 +03:00
Ville Skyttä a23a201788 Tighten macro regexp to min 3 chars, starting with a letter or underscore.
Based on patch by Josef Strzibny <strzibny@dhcp-25-242.brq.redhat.com>,
http://rpmlint.zarb.org/cgi-bin/trac.cgi/ticket/569
2015-07-09 16:43:42 +03:00
Ville Skyttä d302e2f8ed Remove no longer updated CVS keywords. 2015-07-09 16:43:41 +03:00
Ville Skyttä ee6569aacb Fix indentation.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1891 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:41 +03:00
Ville Skyttä ebf2a3f9a6 Delete trailing whitespace.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1839 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:40 +03:00
Ville Skyttä 803dcdb801 Return urllib info() from check_url() if available.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1822 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:39 +03:00
Ville Skyttä 8420e06175 Clean up unused variables and imports.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1753 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:38 +03:00
Ville Skyttä a2df6e6b88 Skip ghost files in files checks, https://bugzilla.redhat.com/570086
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1735 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:37 +03:00
Michael Scherer 28730d3513 do not execute check if the network test are marked as disabled, and simplify the logic
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1730 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:37 +03:00
Ville Skyttä bddeebcd94 Use our own User-Agent in urllib2 requests.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1713 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:37 +03:00
Ville Skyttä 18846bcdf5 Try harder to get something to print about inaccessible URLs.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1709 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:37 +03:00
Ville Skyttä 3a35467d64 Do HTTP redirects with HEAD too, urllib2 appears to reset them to GET.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1706 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:36 +03:00
Ville Skyttä 58db6f31fb Avoid embedding anything other than reason in reason id for -i to work.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1704 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:36 +03:00
Ville Skyttä 54c5134892 Check that *URL, SourceX and PatchX are not broken links (#165).
The new config option NetworkEnabled needs to be True for this check to
happen (default is False).  See also the new NetworkTimeout option.


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1701 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:36 +03:00
Ville Skyttä d173559f48 Pass verbosity flag to check classes.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1699 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:36 +03:00
Ville Skyttä eaec3236bb Report all unexpanded macros in files and changelogs, not just first of line.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1696 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:36 +03:00
Ville Skyttä 52e93c504e Output complete found macro candidate in misspelled macro related messages.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1622 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:34 +03:00
Ville Skyttä 005b606122 Move regex that matches macros to AbstractCheck, use it, improve misspelled-macro info message.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1619 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:34 +03:00
Ville Skyttä f4c92586a7 Cleanups.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1544 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:32 +03:00
Ville Skyttä 6387cde4a8 Dict access cleanups.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1520 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:32 +03:00
Ville Skyttä 5adbaf8465 Import cleanup (PEP 8).
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1516 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:32 +03:00
Ville Skyttä e5800a2466 Do not reset list of default checks to run if Config.addCheck() is used in config files.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1511 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:32 +03:00
Ville Skyttä 627f8d9c31 Add utf-8 magic comments.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1506 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:31 +03:00
Ville Skyttä c603750a1a Trim trailing whitespace.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1478 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:31 +03:00
Ville Skyttä 6b1d51858b pylint cleanups.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1470 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:30 +03:00
Ville Skyttä 709bb286f5 Autoregister checks only once (by name) so checks (and configs) can import each other without resulting in multiple instances of a particular check being run.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1328 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:27 +03:00
Michael Scherer e3fd820a6f - remove pychecker errors:
- unused variable
  - variable that shadow builtins
  - unused expression ( usually used to trigger a exception )
  - do not raise string as exception 


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1204 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:24 +03:00
Michael Scherer 1f0e517219 - create a new class AbstractFilesCheck to factorise the code that filter and extract files based on a regexp.
this class is now used for PamCheck.py, and other similar check will be converted soon.  


git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1158 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:23 +03:00
Ville Skyttä c79d60297b 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
2015-07-09 16:43:22 +03:00
Michael Scherer 0331f799da - raise not implemented when AbstractCheck.check is not implemented instead of silently passing
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1105 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:43:22 +03:00
Ville Skyttä b17ba933d4 Fix indentation, untabify, trim trailing whitespace.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1049 9bc8b190-ac0f-0410-8968-dc7d1f502856
2015-07-09 16:42:46 +03:00
Frédéric Lepied a14cd35b5a corrected warnings reported by pychecker
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@568 9bc8b190-ac0f-0410-8968-dc7d1f502856
2001-11-14 16:34:02 +00:00
Chmouel Boudjnah b61a992b94 Initial revision
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@2 9bc8b190-ac0f-0410-8968-dc7d1f502856
1999-10-01 07:15:25 +00:00