widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #09006
[Merge] lp:~widelands-dev/widelands/codecheck_remove_2_rules into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/codecheck_remove_2_rules into lp:widelands.
Commit message:
Remove 2 codecheck rules which are now covered by calling clang-format:
- long_line: causes frequent Travis fails
- illegal_space_before: conflicts with clang-format in the casern_workersqueue branch due to preprocessor calls
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/codecheck_remove_2_rules/+merge/312526
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/codecheck_remove_2_rules into lp:widelands.
=== removed file 'cmake/codecheck/rules/illegal_space_before'
--- cmake/codecheck/rules/illegal_space_before 2010-02-05 01:13:20 +0000
+++ cmake/codecheck/rules/illegal_space_before 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
-#!/usr/bin/python
-
-
-"""
-This catches a space before a closing grouping token (bracket, brace or
-parenthesis), semicolon or comma. Characters inside "" and after // are
-ignored.
-"""
-
-error_msg = "No space before ), }, ; allowed!"
-
-regexp = r"""^([^/#"']|/([^/"']|"([^"]|\\")*"|'(\\[\'0nt]|[^\'])')|"([^"\]|\\"|\\[^"])*"|'(\\[\'0nt]|[^\'])')*/? []);,]"""
-
-forbidden = [
- ' )',
- ' / )',
- '; ;',
-]
-
-allowed = [
- '// }',
- '// )',
- ' // )',
- '" )"',
- '" \")"',
- ' " \")"',
-]
=== removed file 'cmake/codecheck/rules/long_line'
--- cmake/codecheck/rules/long_line 2010-11-06 16:31:40 +0000
+++ cmake/codecheck/rules/long_line 1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-#!/usr/bin/python -tt
-
-class EvalMatches( object ):
- def __call__(self, lines, fn):
- errors = []
- curline = 1
- for l in lines:
- l = l.rstrip('\r').rstrip('\n')
- l = l.expandtabs(3)
- if len(l) > 110:
- errors.append( (fn, curline, "Line is too long! Keep it < 110 chars (with tab width of 3)"))
- curline += 1
- return errors
-
-
-evaluate_matches = EvalMatches()
-
-forbidden = [
- " "*110+"a",
- '\t\t' + 105*"a"
-]
-
-allowed = [
- "\t\tResonable sized line",
- " "*110,
- '\t\t' + 104*"a",
- # When tabs are correctly expanded, the next line is only 79 chars long
- # when tabs are replaced, it is 81
- """\t\t\t \t \t (Coords(s.get_safe_int("pointy_x"), s.get_safe_int("point_y")))"""
-]
Follow ups