Skip to content

Commit

Permalink
bears: Change LANGUAGES to set accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrianzatreanu committed Jun 14, 2016
1 parent ded0083 commit 224936f
Show file tree
Hide file tree
Showing 72 changed files with 73 additions and 73 deletions.
2 changes: 1 addition & 1 deletion bears/c_languages/CPPCheckBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CPPCheckBear:
For more information, consult <https://github.com/danmar/cppcheck>.
"""

LANGUAGES = "C", "C++"
LANGUAGES = {"C", "C++"}

@staticmethod
def create_arguments(filename, file, config_file,
Expand Down
2 changes: 1 addition & 1 deletion bears/c_languages/CPPCleanBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CPPCleanBear:
<https://github.com/myint/cppclean#features>.
"""

LANGUAGES = "C++"
LANGUAGES = {"C++"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/c_languages/CPPLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CPPLintBear:
For more information, consult <https://github.com/theandrewdavis/cpplint>.
"""

LANGUAGES = "C++"
LANGUAGES = {"C++"}

@staticmethod
def create_arguments(filename, file, config_file,
Expand Down
2 changes: 1 addition & 1 deletion bears/c_languages/CSharpLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CSharpLintBear:
Checks C# code for syntactical correctness using the ``mcs`` compiler.
"""

LANGUAGES = "C#"
LANGUAGES = {"C#"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
4 changes: 2 additions & 2 deletions bears/c_languages/ClangBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,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"}

check_prerequisites = classmethod(clang_available)

Expand Down
2 changes: 1 addition & 1 deletion bears/c_languages/GNUIndentBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class GNUIndentBear:
C++ support is considered experimental.
"""

LANGUAGES = ("C", "C++")
LANGUAGES = {"C", "C++"}

@staticmethod
def create_arguments(filename, file, config_file,
Expand Down
2 changes: 1 addition & 1 deletion bears/cmake/CMakeLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CMakeLintBear:
"""
Checks the code with ``cmakelint``.
"""
LANGUAGES = 'CMake'
LANGUAGES = {'CMake'}

@staticmethod
def create_arguments(filename, file, config_file,
Expand Down
2 changes: 1 addition & 1 deletion bears/coffee_script/CoffeeLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CoffeeLintBear:
For more information about coffeelint, visit <http://www.coffeelint.org/>.
"""

LANGUAGES = "CoffeeScript"
LANGUAGES = {"CoffeeScript"}

severity_map = {'warn': RESULT_SEVERITY.NORMAL,
'error': RESULT_SEVERITY.MAJOR}
Expand Down
2 changes: 1 addition & 1 deletion bears/configfiles/DockerfileLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DockerfileLintBear:
See <https://github.com/projectatomic/dockerfile_lint#dockerfile-lint> for
more information .
"""
LANGUAGES = "Dockerfile"
LANGUAGES = {"Dockerfile"}

severity_map = {
"error": RESULT_SEVERITY.MAJOR,
Expand Down
2 changes: 1 addition & 1 deletion bears/css/CSSAutoPrefixBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CSSAutoPrefixBear:
"""
This bear adds vendor prefixes to CSS rules using ``autoprefixer`` utility.
"""
LANGUAGES = "CSS"
LANGUAGES = {"CSS"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/css/CSSLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CSSLintBear:
Check code for syntactical or semantical problems that might lead to
problems or inefficiencies.
"""
LANGUAGES = "CSS"
LANGUAGES = {"CSS"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/dart/DartLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DartLintBear:
This bear expects dart commands to be on your ``PATH``. Please ensure
/path/to/dart-sdk/bin is in your ``PATH``.
"""
LANGUAGES = "Dart"
LANGUAGES = {"Dart"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/general/CPDBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CPDBear(GlobalBear):
lowered_lang_dict = {key.lower(): value
for key, value in language_dict.items()}

LANGUAGES = tuple(language_dict.keys())
LANGUAGES = set(language_dict.keys())

@classmethod
def check_prerequisites(cls): # pragma: no cover
Expand Down
2 changes: 1 addition & 1 deletion bears/general/FilenameBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class FilenameBear(LocalBear):
LANGUAGES = "All"
LANGUAGES = {"All"}

_naming_convention = {"camel": to_camelcase,
"pascal": to_pascalcase,
Expand Down
2 changes: 1 addition & 1 deletion bears/general/InvalidLinkBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class InvalidLinkBear(LocalBear):
DEFAULT_TIMEOUT = 2
LANGUAGES = "All"
LANGUAGES = {"All"}

# IP Address of www.google.com
check_connection_url = "http://216.58.218.174"
Expand Down
2 changes: 1 addition & 1 deletion bears/general/KeywordBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class KeywordBear(LocalBear):
LANGUAGES = "All"
LANGUAGES = {"All"}

def run(self,
filename,
Expand Down
2 changes: 1 addition & 1 deletion bears/general/LineCountBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class LineCountBear(LocalBear):
LANGUAGES = "All"
LANGUAGES = {"All"}

def run(self, filename, file, max_lines_per_file: int):
"""
Expand Down
2 changes: 1 addition & 1 deletion bears/general/LineLengthBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class LineLengthBear(LocalBear):
LANGUAGES = "All"
LANGUAGES = {"All"}

def run(self,
filename,
Expand Down
2 changes: 1 addition & 1 deletion bears/general/SpaceConsistencyBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class SpaceConsistencyBear(LocalBear):
LANGUAGES = "All"
LANGUAGES = {"All"}

def run(self,
filename,
Expand Down
2 changes: 1 addition & 1 deletion bears/go/GoErrCheckBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class GoErrCheckBear:
For more information on the analysis visit <https://github.com/kisielk/errcheck>.
"""
LANGUAGES = "Go"
LANGUAGES = {"Go"}

@staticmethod
def create_arguments(filename, file, config_file,
Expand Down
2 changes: 1 addition & 1 deletion bears/go/GoImportsBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class GoImportsBear:
"""
Adds/Removes imports to Go code for missing imports.
"""
LANGUAGES = "Go"
LANGUAGES = {"Go"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/go/GoLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GoLintBear:
Checks the code using ``golint``. This will run golint over each file
separately.
"""
LANGUAGES = "Go"
LANGUAGES = {"Go"}

@staticmethod
def create_arguments(filename, file, config_file,
Expand Down
2 changes: 1 addition & 1 deletion bears/go/GoReturnsBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class GoReturnsBear:
"""
Proposes corrections of Go code using ``goreturns``.
"""
LANGUAGES = "Go"
LANGUAGES = {"Go"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/go/GoTypeBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GoTypeBear:
Checks the code using ``gotype``. This will run ``gotype`` over each file
separately.
"""
LANGUAGES = "Go"
LANGUAGES = {"Go"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/go/GoVetBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class GoVetBear:
This is done using the ``vet`` command. For more information visit
<https://golang.org/cmd/vet/>.
"""
LANGUAGES = "Go"
LANGUAGES = {"Go"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/go/GofmtBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class GofmtBear:
This is done using the ``gofmt`` utility. For more information visit
<https://golang.org/cmd/gofmt/>.
"""
LANGUAGES = "Go"
LANGUAGES = {"Go"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/haskell/HaskellLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HaskellLintBear:
information.
"""

LANGUAGES = "Haskell"
LANGUAGES = {"Haskell"}

severity_map = {"Error": RESULT_SEVERITY.MAJOR,
"Warning": RESULT_SEVERITY.NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion bears/hypertext/BootLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class BootLintBear:
For more about the analysis, check Bootlint
<https://github.com/twbs/bootlint#bootlint>.
"""
LANGUAGES = "HTML"
LANGUAGES = {"HTML"}

@staticmethod
def create_arguments(filename, file, config_file,
Expand Down
2 changes: 1 addition & 1 deletion bears/hypertext/HTMLLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class HTMLLintBear:

_html_lint = which('html_lint.py')

LANGUAGES = "HTML"
LANGUAGES = {"HTML"}

@staticmethod
def create_arguments(filename, file, config_file,
Expand Down
2 changes: 1 addition & 1 deletion bears/java/CheckstyleBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CheckstyleBear:
<http://checkstyle.sourceforge.net/checks.html>.
"""

LANGUAGES = "Java"
LANGUAGES = {"Java"}

def setup_dependencies(self):
type(self).checkstyle_jar_file = self.download_cached_file(
Expand Down
2 changes: 1 addition & 1 deletion bears/java/InferBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class InferBear(LocalBear, Lint):
severity_map = {
"error": RESULT_SEVERITY.MAJOR,
"warning": RESULT_SEVERITY.NORMAL}
LANGUAGES = "Java"
LANGUAGES = {"Java"}

def run(self, filename, file):
'''
Expand Down
2 changes: 1 addition & 1 deletion bears/java/JavaPMDBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class JavaPMDBear:
<http://pmd.github.io/pmd-5.4.1/pmd-java/rules/index.html>.
"""

LANGUAGES = "Java"
LANGUAGES = {"Java"}

@classmethod
def check_prerequisites(cls): # pragma: no cover
Expand Down
2 changes: 1 addition & 1 deletion bears/js/ESLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ESLintBear:
Find out more at <http://eslint.org/docs/rules/>.
"""

LANGUAGES = ("JavaScript", "JSX")
LANGUAGES = {"JavaScript", "JSX"}

severity_map = {2: RESULT_SEVERITY.MAJOR,
1: RESULT_SEVERITY.NORMAL,
Expand Down
2 changes: 1 addition & 1 deletion bears/js/JSComplexityBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class JSComplexityBear:
"""
Calculates cyclomatic complexity using ``cr``.
"""
LANGUAGES = "JavaScript"
LANGUAGES = {"JavaScript"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/js/JSHintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class JSHintBear:
For more information on the analysis visit <http://jshint.com/>
"""

LANGUAGES = "JavaScript"
LANGUAGES = {"JavaScript"}

@staticmethod
def generate_config(filename, file,
Expand Down
2 changes: 1 addition & 1 deletion bears/js/JSONFormatBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class JSONFormatBear(LocalBear):
except AttributeError:
DecodeError = ValueError

LANGUAGES = "JSON"
LANGUAGES = {"JSON"}

def run(self, filename, file,
json_sort: bool=False,
Expand Down
2 changes: 1 addition & 1 deletion bears/julia/JuliaLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class JuliaLintBear:
See <https://lintjl.readthedocs.org/en/stable/> for more information
on the analysis provided.
"""
LANGUAGES = "Julia"
LANGUAGES = {"Julia"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/latex/LatexLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class LatexLintBear:
"""
Checks the code with ``chktex``.
"""
LANGUAGES = "Tex"
LANGUAGES = {"Tex"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/lua/LuaLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class LuaLintBear:
Read more at <https://github.com/mpeterv/luacheck>.
"""

LANGUAGES = "Lua"
LANGUAGES = {"Lua"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
2 changes: 1 addition & 1 deletion bears/markdown/MarkdownBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MarkdownBear:
below.
"""

LANGUAGES = "Markdown"
LANGUAGES = {"Markdown"}

@staticmethod
def create_arguments(filename, file, config_file,
Expand Down
2 changes: 1 addition & 1 deletion bears/matlab/MatlabIndentationBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class MatlabIndentationBear(LocalBear):
LANGUAGES = ("Matlab", "Octave")
LANGUAGES = {"Matlab", "Octave"}

def run(self, filename, file, tab_width: int=2):
"""
Expand Down
2 changes: 1 addition & 1 deletion bears/natural_language/AlexBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AlexBear(LocalBear, Lint):
r'(?P<end_line>\d+):(?P<end_column>\d+)'
r'\s+(?:(?P<warning>warning))\s+(?P<message>.+)')
arguments = "{filename}"
LANGUAGES = "Natural Language"
LANGUAGES = {"Natural Language"}

def run(self, filename, file):
'''
Expand Down
2 changes: 1 addition & 1 deletion bears/natural_language/LanguageToolBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class LanguageToolBear(LocalBear):
LANGUAGES = "Natural Language"
LANGUAGES = {"Natural Language"}

@classmethod
def check_prerequisites(cls):
Expand Down
2 changes: 1 addition & 1 deletion bears/natural_language/ProseLintBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ProseLintBear:
"""
Lints the file using ``proselint``.
"""
LANGUAGES = "Natural Language"
LANGUAGES = {"Natural Language"}

@staticmethod
def create_arguments(filename, file, config_file):
Expand Down
Loading

0 comments on commit 224936f

Please sign in to comment.