forked from coala/coala-bears
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Due to a bug it will replace multiline strings in one line with: '"" string ""'. I had to manually postcorrect those to single line strings.
- Loading branch information
Showing
173 changed files
with
1,644 additions
and
1,644 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,22 +5,22 @@ | |
from coalib.settings.Setting import typed_list | ||
|
||
|
||
@linter(executable="cppcheck", | ||
@linter(executable='cppcheck', | ||
use_stdout=False, | ||
use_stderr=True, | ||
output_format="regex", | ||
output_format='regex', | ||
output_regex=r'(?P<line>\d+):(?P<severity>[a-zA-Z]+):' | ||
r'(?P<origin>[a-zA-Z]+):(?P<message>.*)', | ||
severity_map={"error": RESULT_SEVERITY.MAJOR, | ||
"warning": RESULT_SEVERITY.NORMAL, | ||
"style": RESULT_SEVERITY.INFO}) | ||
severity_map={'error': RESULT_SEVERITY.MAJOR, | ||
'warning': RESULT_SEVERITY.NORMAL, | ||
'style': RESULT_SEVERITY.INFO}) | ||
class CPPCheckBear: | ||
""" | ||
Report possible security weaknesses for C/C++. | ||
For more information, consult <https://github.com/danmar/cppcheck>. | ||
""" | ||
|
||
LANGUAGES = {"C", "C++"} | ||
LANGUAGES = {'C', 'C++'} | ||
REQUIREMENTS = {DistributionRequirement(apt_get='cppcheck')} | ||
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'[email protected]'} | ||
|
@@ -37,9 +37,9 @@ def create_arguments(filename, file, config_file, | |
portability, information, unusedFunction, | ||
missingInclude | ||
""" | ||
args = ("--template={line}:{severity}:{id}:{message}",) | ||
args = ('--template={line}:{severity}:{id}:{message}',) | ||
|
||
if enable: | ||
args += ('--enable=' + ",".join(enable),) | ||
args += ('--enable=' + ','.join(enable),) | ||
|
||
return args + (filename,) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ class CPPCleanBear: | |
<https://github.com/myint/cppclean#features>. | ||
""" | ||
|
||
LANGUAGES = {"C++"} | ||
LANGUAGES = {'C++'} | ||
REQUIREMENTS = {PipRequirement('cppclean', '0.9.*')} | ||
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'[email protected]'} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ class CPPLintBear: | |
For more information, consult <https://github.com/theandrewdavis/cpplint>. | ||
""" | ||
|
||
LANGUAGES = {"C++"} | ||
LANGUAGES = {'C++'} | ||
REQUIREMENTS = {PipRequirement('cpplint', '1.*')} | ||
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'[email protected]'} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ class CSharpLintBear: | |
Checks C# code for syntactical correctness using the ``mcs`` compiler. | ||
""" | ||
|
||
LANGUAGES = {"C#"} | ||
LANGUAGES = {'C#'} | ||
REQUIREMENTS = {DistributionRequirement(apt_get='mono-mcs')} | ||
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'[email protected]'} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,8 +23,8 @@ def clang_available(cls): | |
|
||
|
||
class ClangBear(LocalBear): | ||
LANGUAGES = {"C", "C++", "Objective-C", "Objective-C++", "OpenMP", | ||
"OpenCL", "CUDA"} | ||
LANGUAGES = {'C', 'C++', 'Objective-C', 'Objective-C++', 'OpenMP', | ||
'OpenCL', 'CUDA'} | ||
REQUIREMENTS = {PipRequirement('libclang-py3', '0.2')} | ||
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'[email protected]'} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,10 @@ | |
DistributionRequirement) | ||
|
||
|
||
@linter(executable="indent" if platform.system() != "Darwin" else "gindent", | ||
@linter(executable='indent' if platform.system() != 'Darwin' else 'gindent', | ||
use_stdin=True, | ||
output_format='corrected', | ||
result_message="Indentation can be improved.") | ||
result_message='Indentation can be improved.') | ||
class GNUIndentBear: | ||
""" | ||
This bear checks and corrects spacing and indentation via the well known | ||
|
@@ -20,7 +20,7 @@ class GNUIndentBear: | |
C++ support is considered experimental. | ||
""" | ||
|
||
LANGUAGES = {"C", "C++"} | ||
LANGUAGES = {'C', 'C++'} | ||
REQUIREMENTS = {DistributionRequirement(apt_get='indent')} | ||
AUTHORS = {'The coala developers'} | ||
AUTHORS_EMAILS = {'[email protected]'} | ||
|
@@ -160,39 +160,39 @@ def create_arguments(filename, file, config_file, | |
Any command line options the indent binary understands. They | ||
will be simply passed through. | ||
""" | ||
indent_options = ("--no-tabs" if use_spaces else "--use-tabs", | ||
"--line-length", str(max_line_length), | ||
"--indent-level", str(indent_size), | ||
"--tab-size", str(indent_size), ) | ||
indent_options += (("--cuddle-do-while",) | ||
indent_options = ('--no-tabs' if use_spaces else '--use-tabs', | ||
'--line-length', str(max_line_length), | ||
'--indent-level', str(indent_size), | ||
'--tab-size', str(indent_size), ) | ||
indent_options += (('--cuddle-do-while',) | ||
if while_and_brace_on_same_line | ||
else ("--dont-cuddle-do-while",)) | ||
indent_options += (("--swallow-optional-blank-lines",) | ||
if delete_optional_blank_lines else ("-nsob",)) | ||
indent_options += (("--blank-lines-after-declarations",) | ||
if blank_lines_after_declarations else ("-nbad",)) | ||
indent_options += (("--blank-lines-after-commas",) | ||
if blank_lines_after_commas else ("-nbc",)) | ||
indent_options += (("--blank-lines-after-procedures",) | ||
if blank_lines_after_procedures else ("-nbap",)) | ||
indent_options += (("-di" + str(declaration_indent),) | ||
else ('--dont-cuddle-do-while',)) | ||
indent_options += (('--swallow-optional-blank-lines',) | ||
if delete_optional_blank_lines else ('-nsob',)) | ||
indent_options += (('--blank-lines-after-declarations',) | ||
if blank_lines_after_declarations else ('-nbad',)) | ||
indent_options += (('--blank-lines-after-commas',) | ||
if blank_lines_after_commas else ('-nbc',)) | ||
indent_options += (('--blank-lines-after-procedures',) | ||
if blank_lines_after_procedures else ('-nbap',)) | ||
indent_options += (('-di' + str(declaration_indent),) | ||
if declaration_indent != 0 else ()) | ||
indent_options += (("--case-indentation"+str(case_indentation),) | ||
indent_options += (('--case-indentation'+str(case_indentation),) | ||
if case_indentation != 0 else ()) | ||
indent_options += (("--space-special-semicolon",) | ||
indent_options += (('--space-special-semicolon',) | ||
if space_before_semicolon_after_empty_loop | ||
else ("-nss",)) | ||
indent_options += ("--brace-indent"+str(brace_indent),) | ||
indent_options += (("--braces-on-func-def-line",) | ||
if braces_on_func_def_line else ("-blf",)) | ||
indent_options += ((("-ce",) if cuddle_else else ("-nce",)) + | ||
("-br",)) if braces_on_if_line else ("-bl",) | ||
else ('-nss',)) | ||
indent_options += ('--brace-indent'+str(brace_indent),) | ||
indent_options += (('--braces-on-func-def-line',) | ||
if braces_on_func_def_line else ('-blf',)) | ||
indent_options += ((('-ce',) if cuddle_else else ('-nce',)) + | ||
('-br',)) if braces_on_if_line else ('-bl',) | ||
indent_style_option = () | ||
indent_style_option += ("--gnu-style",) if gnu_style else () | ||
indent_style_option += (("--k-and-r-style",) | ||
indent_style_option += ('--gnu-style',) if gnu_style else () | ||
indent_style_option += (('--k-and-r-style',) | ||
if k_and_r_style and indent_style_option is () | ||
else ()) | ||
indent_style_option += (("--linux-style",) | ||
indent_style_option += (('--linux-style',) | ||
if linux_style and indent_style_option is () | ||
else ()) | ||
# If a style is chosen the other configs aren't passed to `indent` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.