diff --git a/README.md b/README.md index b6070181..b41d84e8 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,7 @@ Java language: - [x] Checkstyle [GNU LGPL v2.1] * [Site and docs](https://checkstyle.sourceforge.io/) * [Repository](https://github.com/checkstyle/checkstyle) - -- [ ] SpotBugs [GNU LGPL v2.1] - * [Site and docs](https://spotbugs.github.io/) - * [Repository](https://github.com/spotbugs/spotbugs) + - [ ] SpringLint * [Repository](https://github.com/mauricioaniche/springlint) diff --git a/src/python/review/inspectors/inspector_type.py b/src/python/review/inspectors/inspector_type.py index e9bfe430..ebf716cb 100644 --- a/src/python/review/inspectors/inspector_type.py +++ b/src/python/review/inspectors/inspector_type.py @@ -13,12 +13,10 @@ class InspectorType(Enum): # Java language PMD = 'PMD' CHECKSTYLE = 'CHECKSTYLE' - SPOTBUGS = 'SPOTBUGS' SPRINGLINT = 'SPRINGLINT' # Kotlin language DETEKT = 'DETEKT' - INTELLIJ = 'INTELLIJ' # JavaScript language ESLINT = 'ESLINT' diff --git a/src/python/review/inspectors/intellij/__init__.py b/src/python/review/inspectors/intellij/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/python/review/inspectors/intellij/intellij.py b/src/python/review/inspectors/intellij/intellij.py deleted file mode 100644 index 46a0437c..00000000 --- a/src/python/review/inspectors/intellij/intellij.py +++ /dev/null @@ -1,178 +0,0 @@ -import logging -import os -import re -from pathlib import Path -from typing import Any, Dict, List, Optional, Union -from xml.etree import ElementTree - -from src.python.review.common.file_system import get_all_file_system_items, new_temp_dir -from src.python.review.common.subprocess_runner import run_in_subprocess -from src.python.review.inspectors.base_inspector import BaseInspector -from src.python.review.inspectors.inspector_type import InspectorType -from src.python.review.inspectors.intellij.issue_types import ISSUE_CLASS_TO_ISSUE_TYPE -from src.python.review.inspectors.issue import BaseIssue, CodeIssue, IssueDifficulty, IssueType - -logger = logging.getLogger(__name__) - -INTELLIJ_INSPECTOR_EXECUTABLE = os.environ.get('INTELLIJ_INSPECTOR_EXECUTABLE') -INTELLIJ_INSPECTOR_PROJECT = Path(__file__).parent / 'project' -INTELLIJ_INSPECTOR_SETTINGS = (INTELLIJ_INSPECTOR_PROJECT / '.idea' / 'inspectionProfiles' / 'custom_profiles.xml') - -PYTHON_FOLDER = 'python_sources' -JAVA_FOLDER = 'java_sources/src' -KOTLIN_FOLDER = 'kotlin_sources/src' - -PYTHON_SOURCES = INTELLIJ_INSPECTOR_PROJECT / PYTHON_FOLDER -JAVA_SOURCES = INTELLIJ_INSPECTOR_PROJECT / JAVA_FOLDER -KOTLIN_SOURCES = INTELLIJ_INSPECTOR_PROJECT / KOTLIN_FOLDER - -SUPPORTED_EXTENSIONS = ('.java', '.py', '.kt', '.kts') - - -class IntelliJInspector(BaseInspector): - inspector_type = InspectorType.INTELLIJ - - skipped_issues = [ - 'Unresolved references', - ] - - def __init__(self): - if not JAVA_SOURCES.exists(): - JAVA_SOURCES.mkdir(parents=True) - if not PYTHON_SOURCES.exists(): - PYTHON_SOURCES.mkdir(parents=True) - if not KOTLIN_SOURCES.exists(): - KOTLIN_SOURCES.mkdir(parents=True) - - @staticmethod - def create_command(output_dir_path) -> List[Union[str, Path]]: - return [ - INTELLIJ_INSPECTOR_EXECUTABLE, INTELLIJ_INSPECTOR_PROJECT, - INTELLIJ_INSPECTOR_SETTINGS, output_dir_path, '-v2', - ] - - def inspect(self, path: Path, config: Dict[str, Any]) -> List[BaseIssue]: - - path_in_project_to_origin_path = self.copy_files_to_project(path) - try: - with new_temp_dir() as temp_dir: - command = self.create_command(temp_dir) - run_in_subprocess(command) - issues = self.parse(temp_dir, path_in_project_to_origin_path) - finally: - for file_path_in_project in path_in_project_to_origin_path: - file_path_in_project.unlink() - - return issues - - def copy_files_to_project(self, path: Path) -> Dict[Path, Path]: - if path.is_file(): - root_path = path.parent - file_paths = [path] - elif path.is_dir(): - root_path = path - file_paths = get_all_file_system_items(root_path) - else: - raise ValueError - - path_in_project_to_origin_path = {} - for file_path in file_paths: - if not self.check_supported_extension(file_path): - continue - - relative_file_path = file_path.relative_to(root_path) - file_path_in_project = self._get_file_path_in_project(relative_file_path) - - text = file_path.read_text() - file_path_in_project.write_text(text) - - path_in_project_to_origin_path[file_path_in_project] = file_path - - return path_in_project_to_origin_path - - @staticmethod - def check_supported_extension(file_path: Path) -> bool: - return file_path.suffix.endswith(SUPPORTED_EXTENSIONS) - - @classmethod - def _get_file_path_in_project(cls, relative_file_path: Path) -> Path: - - if relative_file_path.suffix.endswith('.java'): - return JAVA_SOURCES / relative_file_path - - elif relative_file_path.suffix.endswith(('.kt', '.kts')): - return KOTLIN_SOURCES / relative_file_path - - elif relative_file_path.suffix.endswith('.py'): - return PYTHON_SOURCES / relative_file_path - - else: - raise ValueError - - @classmethod - def parse(cls, out_dir_path: Path, - path_in_project_to_origin_path: Dict[Path, Path]) -> List[BaseIssue]: - out_file_paths = [ - file_path for file_path in get_all_file_system_items(out_dir_path) - if file_path.suffix.endswith('.xml') and not file_path.name.startswith('.') - ] - - issues: List[BaseIssue] = [] - for file_path in out_file_paths: - tree = ElementTree.parse(file_path) - root = tree.getroot() - for child in root: - file_path: Optional[Path] = None - line_no: Optional[int] = None - issue_class: Optional[str] = None - description: Optional[str] = None - - for element in child: - tag = element.tag - text = element.text - if tag == 'file': - file_path = Path( - text.replace( - 'file://$PROJECT_DIR$', - str(INTELLIJ_INSPECTOR_PROJECT), - ), - ) - elif tag == 'line': - line_no = int(text) - elif tag == 'problem_class': - issue_class = text - elif tag == 'description': - description = (re.compile(r'<[^<]+>') - .sub('', text) - .replace('#loc', '')) - - if not file_path or not line_no or not issue_class or not description: - continue - else: - issue_type = cls.choose_issue_type(issue_class) - file_path = path_in_project_to_origin_path[file_path] - - if issue_type and issue_class not in cls.skipped_issues: - issues.append(CodeIssue( - file_path=file_path, - line_no=line_no, - column_no=1, - description=description, - origin_class=issue_class, - inspector_type=cls.inspector_type, - type=issue_type, - difficulty=IssueDifficulty.get_by_issue_type(issue_type), - )) - - return issues - - @classmethod - def choose_issue_type(cls, issue_class: str) -> IssueType: - - issue_type = ISSUE_CLASS_TO_ISSUE_TYPE.get(issue_class) - if not issue_type: - logger.warning('%s: %s - unknown error code' % - (cls.inspector_type.value, issue_class)) - issue_type = None - - return issue_type diff --git a/src/python/review/inspectors/intellij/issue_types/__init__.py b/src/python/review/inspectors/intellij/issue_types/__init__.py deleted file mode 100644 index 97b8d31e..00000000 --- a/src/python/review/inspectors/intellij/issue_types/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -from typing import Dict - -from src.python.review.inspectors.intellij.issue_types.java import ( - ISSUE_CLASS_TO_ISSUE_TYPE as JAVA_ISSUE_CLASS_TO_ISSUE_TYPE, -) -from src.python.review.inspectors.intellij.issue_types.kotlin import ( - ISSUE_CLASS_TO_ISSUE_TYPE as KOTLIN_ISSUE_CLASS_TO_ISSUE_TYPE, -) -from src.python.review.inspectors.intellij.issue_types.python import ( - ISSUE_CLASS_TO_ISSUE_TYPE as PYTHON_ISSUE_CLASS_TO_ISSUE_TYPE, -) -from src.python.review.inspectors.issue import IssueType - -ISSUE_CLASS_TO_ISSUE_TYPE: Dict[str, IssueType] = { - **JAVA_ISSUE_CLASS_TO_ISSUE_TYPE, - **PYTHON_ISSUE_CLASS_TO_ISSUE_TYPE, - **KOTLIN_ISSUE_CLASS_TO_ISSUE_TYPE, -} diff --git a/src/python/review/inspectors/intellij/issue_types/java.py b/src/python/review/inspectors/intellij/issue_types/java.py deleted file mode 100644 index 3019b353..00000000 --- a/src/python/review/inspectors/intellij/issue_types/java.py +++ /dev/null @@ -1,1671 +0,0 @@ -from typing import Dict - -from src.python.review.inspectors.issue import IssueType - -ISSUE_CLASS_TO_ISSUE_TYPE: Dict[str, IssueType] = { - 'Interface method clashes with method in \'java.lang.Object\'': - IssueType.BEST_PRACTICES, - - '\'Optional\' used as field or parameter type': - IssueType.BEST_PRACTICES, - - 'Incompatible bitwise mask operation': - IssueType.ERROR_PRONE, - - 'Pointless bitwise expression': - IssueType.BEST_PRACTICES, - - 'Shift operation by inappropriate constant': - IssueType.ERROR_PRONE, - - 'Abstract class may be interface': - IssueType.BEST_PRACTICES, - - 'Field can be local': - IssueType.BEST_PRACTICES, - - 'Parameter can be local': - IssueType.BEST_PRACTICES, - - '\'private\' method declared \'final\'': - IssueType.BEST_PRACTICES, - - '\'static\' method declared \'final\'': - IssueType.BEST_PRACTICES, - - 'Deprecated API usage': - IssueType.BEST_PRACTICES, - - 'Usage of API marked for removal': - IssueType.ERROR_PRONE, - - 'Deprecated member is still used': - IssueType.BEST_PRACTICES, - - 'Deprecated method is still used': - IssueType.BEST_PRACTICES, - - 'Javac quirks': - IssueType.ERROR_PRONE, - - 'Unchecked warning': - IssueType.ERROR_PRONE, - - # Java language level migration aids - '\'compare()\' method can be used to compare numbers': - IssueType.BEST_PRACTICES, - - '\'if\' replaceable with \'switch\'': - IssueType.BEST_PRACTICES, - - 'Usages of API which isn\'t available at the configured language level': - IssueType.ERROR_PRONE, - - # To Java 5 - 'Raw use of parameterized class': IssueType.BEST_PRACTICES, - 'Unnecessary boxing': IssueType.BEST_PRACTICES, - 'Unnecessary unboxing': IssueType.BEST_PRACTICES, - - # To Java 7 - '\'equals()\' expression replaceable by \'Objects.equals()\' expression': - IssueType.BEST_PRACTICES, - - 'Explicit type can be replaced with <>': - IssueType.BEST_PRACTICES, - - 'Identical \'catch\' branches in \'try\' statement': - IssueType.BEST_PRACTICES, - - '\'try finally\' replaceable with \'try\' with resources': - IssueType.BEST_PRACTICES, - - # To Java 8 - 'Anonymous type can be replaced with lambda': - IssueType.BEST_PRACTICES, - - 'Anonymous type can be replaced with method reference': - IssueType.BEST_PRACTICES, - - 'Anonymous type has shorter lambda alternative': - IssueType.BEST_PRACTICES, - - 'Comparator combinator can be used': - IssueType.BEST_PRACTICES, - - 'Loop can be replaced with Collection.removeIf()': - IssueType.BEST_PRACTICES, - - # To Java 9 - 'Immutable collection creation can be replaced with collection factory call': - IssueType.BEST_PRACTICES, - - 'Null check can be replaced with method call': - IssueType.BEST_PRACTICES, - - # Java | Abstraction issues - 'Cast to a concrete class': - IssueType.BEST_PRACTICES, - 'Chain of \'instanceof\' checks': - IssueType.BEST_PRACTICES, - 'Class references one of its subclasses': - IssueType.BEST_PRACTICES, - 'Collection declared by class, not interface': - IssueType.BEST_PRACTICES, - 'Feature envy': - IssueType.BEST_PRACTICES, - '\'instanceof\' a concrete class': - IssueType.BEST_PRACTICES, - '\'instanceof\' check for \'this\'': - IssueType.BEST_PRACTICES, - 'Local variable of concrete class': - IssueType.BEST_PRACTICES, - 'Magic number': - IssueType.BEST_PRACTICES, - 'Method parameter of concrete class': - IssueType.BEST_PRACTICES, - 'Method return of concrete class': - IssueType.BEST_PRACTICES, - 'Overly strong type cast': - IssueType.BEST_PRACTICES, - 'Private method only used from inner class': - IssueType.BEST_PRACTICES, - '\'public\' method not exposed in interface': - IssueType.BEST_PRACTICES, - '\'public\' method with \'boolean\' parameter': - IssueType.BEST_PRACTICES, - 'Static field of concrete class': - IssueType.BEST_PRACTICES, - 'Static method only used from one other class': - IssueType.BEST_PRACTICES, - 'Type may be weakened': - IssueType.BEST_PRACTICES, - 'Type of instance field is concrete class': - IssueType.BEST_PRACTICES, - - # Java | Assignment issues - 'Assignment replaceable with operator assignment': - IssueType.BEST_PRACTICES, - 'Assignment to \'for\' loop parameter': - IssueType.ERROR_PRONE, - 'Assignment to catch block parameter': - IssueType.ERROR_PRONE, - 'Assignment to lambda parameter': - IssueType.ERROR_PRONE, - 'Assignment to method parameter': - IssueType.ERROR_PRONE, - 'Assignment to static field from instance context': - IssueType.ERROR_PRONE, - 'Assignment used as condition': - IssueType.ERROR_PRONE, - 'Constructor assigns value to field defined in superclass': - IssueType.ERROR_PRONE, - '\'null\' assignment': - IssueType.BEST_PRACTICES, - 'Result of assignment used': - IssueType.BEST_PRACTICES, - 'Value of ++ or -- used': - IssueType.BEST_PRACTICES, - - # Java | Class metric - 'Anonymous inner class with too many methods': - IssueType.BEST_PRACTICES, - 'Class too deep in inheritance tree': - IssueType.BEST_PRACTICES, - 'Class with too many constructors': - IssueType.BEST_PRACTICES, - 'Class with too many fields': - IssueType.BEST_PRACTICES, - 'Class with too many methods': - IssueType.BEST_PRACTICES, - 'Inner class too deeply nested': - IssueType.BEST_PRACTICES, - 'Overly complex anonymous class': - IssueType.BEST_PRACTICES, - 'Overly complex class': - IssueType.BEST_PRACTICES, - 'Overly coupled class': - IssueType.BEST_PRACTICES, - - # Java | Class structure - 'Anonymous inner class': - IssueType.BEST_PRACTICES, - 'Class may extend adapter instead of implementing listener': - IssueType.BEST_PRACTICES, - 'Class name differs from file name': - IssueType.BEST_PRACTICES, - 'Class with only \'private\' constructors should be declared \'final\'': - IssueType.BEST_PRACTICES, - 'Constant declared in abstract class': - IssueType.BEST_PRACTICES, - 'Constant declared in interface': - IssueType.BEST_PRACTICES, - 'Empty class': - IssueType.BEST_PRACTICES, - '\'final\' class': - IssueType.BEST_PRACTICES, - '\'final\' method': - IssueType.BEST_PRACTICES, - '\'final\' method in \'final\' class': - IssueType.BEST_PRACTICES, - 'Inner class of interface': - IssueType.BEST_PRACTICES, - 'Interface may be annotated @FunctionalInterface': - IssueType.BEST_PRACTICES, - 'Limited-scope inner class': - IssueType.BEST_PRACTICES, - 'Marker interface': - IssueType.BEST_PRACTICES, - 'Method returns per-class constant': - IssueType.BEST_PRACTICES, - 'Multiple top level classes in single file': - IssueType.BEST_PRACTICES, - 'No-op method in abstract class': - IssueType.BEST_PRACTICES, - 'Non-\'final\' field in enum': - IssueType.BEST_PRACTICES, - 'Non-\'static\' initializer': - IssueType.BEST_PRACTICES, - '\'protected\' member in \'final\' class': - IssueType.BEST_PRACTICES, - '\'public\' constructor': - IssueType.BEST_PRACTICES, - '\'public\' constructor in non-public class': - IssueType.BEST_PRACTICES, - 'Singleton': - IssueType.BEST_PRACTICES, - '\'static\', non-\'final\' field': - IssueType.BEST_PRACTICES, - - 'Utility class': - IssueType.BEST_PRACTICES, - 'Utility class can be \'enum\'': - IssueType.BEST_PRACTICES, - 'Utility class is not \'final\'': - IssueType.BEST_PRACTICES, - 'Utility class with \'public\' constructor': - IssueType.BEST_PRACTICES, - 'Utility class without \'private\' constructor': - IssueType.BEST_PRACTICES, - - # Java | Cloning issues - '\'clone()\' does not declare \'CloneNotSupportedException\'': - IssueType.ERROR_PRONE, - '\'clone()\' instantiates objects with constructor': - IssueType.ERROR_PRONE, - '\'clone()\' method in non-Cloneable class': - IssueType.ERROR_PRONE, - '\'clone()\' method not \'public\'': - IssueType.ERROR_PRONE, - '\'clone()\' should have return type equal to the class it contains': - IssueType.ERROR_PRONE, - 'Cloneable class without \'clone()\' method': - IssueType.ERROR_PRONE, - 'Use of \'clone()\' or \'Cloneable\'': - IssueType.BEST_PRACTICES, - - # Java | Code maturity - 'Call to \'printStackTrace()\'': - IssueType.BEST_PRACTICES, - 'Call to \'Thread.dumpStack()\'': - IssueType.BEST_PRACTICES, - 'Inspection suppression annotation': - IssueType.BEST_PRACTICES, - '\'Throwable\' printed to \'System.out\'': - IssueType.BEST_PRACTICES, - 'Use of obsolete collection type': - IssueType.BEST_PRACTICES, - 'Use of obsolete date-time API': - IssueType.BEST_PRACTICES, - 'Use of System.out or System.err': - IssueType.BEST_PRACTICES, - - # Java | Code style issues - 'Array can be replaced with enum values': - IssueType.CODE_STYLE, - 'Array creation without \'new\' expression': - IssueType.CODE_STYLE, - '\'assert\' message is not a String': - IssueType.CODE_STYLE, - 'Assignment can be joined with declaration': - IssueType.CODE_STYLE, - 'Block marker comment': - IssueType.CODE_STYLE, - 'C-style array declaration': - IssueType.CODE_STYLE, - 'Call to \'String.concat()\' can be replaced with \'+\'': - IssueType.CODE_STYLE, - 'Can use bounded wildcard': - IssueType.CODE_STYLE, - 'Chained equality comparisons': - IssueType.CODE_STYLE, - 'Chained method calls': - IssueType.CODE_STYLE, - 'Class explicitly extends \'java.lang.Object\'': - IssueType.CODE_STYLE, - 'Code block contains single statement': - IssueType.CODE_STYLE, - 'Conditional can be replaced with Optional': - IssueType.CODE_STYLE, - 'Confusing octal escape sequence': - IssueType.CODE_STYLE, - 'Constant expression can be evaluated': - IssueType.CODE_STYLE, - 'Constant on the wrong side of comparison': - IssueType.CODE_STYLE, - 'Control flow statement without braces': - IssueType.CODE_STYLE, - 'Diamond can be replaced with explicit type arguments': - IssueType.CODE_STYLE, - '\'equals()\' called on Enum value': - IssueType.CODE_STYLE, - '\'expression.equals(\'literal\')\' rather ' - 'than \'\'literal\'.equals(expression)\'': - IssueType.CODE_STYLE, - 'Field assignment can be moved to initializer': - IssueType.CODE_STYLE, - 'Field may be \'final\'': - IssueType.CODE_STYLE, - 'If statement can be replaced with ?:, && or || expression': - IssueType.CODE_STYLE, - 'Implicit call to \'super()\'': - IssueType.CODE_STYLE, - '\'indexOf()\' expression is replaceable with \'contains()\'': - IssueType.CODE_STYLE, - 'Instance field access not qualified with \'this\'': - IssueType.CODE_STYLE, - 'Instance method call not qualified with \'this\'': - IssueType.CODE_STYLE, - 'Labeled switch rule can have code block': - IssueType.CODE_STYLE, - 'Labeled switch rule has redundant code block': - IssueType.CODE_STYLE, - 'Lambda body can be code block': - IssueType.CODE_STYLE, - 'Lambda can be replaced with anonymous class': - IssueType.CODE_STYLE, - 'Lambda parameter type can be specified': - IssueType.CODE_STYLE, - 'Local variable or parameter can be final': - IssueType.CODE_STYLE, - 'Method reference can be replaced with lambda': - IssueType.CODE_STYLE, - 'Missorted modifiers': - IssueType.CODE_STYLE, - 'Multi-catch can be split into separate catch blocks': - IssueType.CODE_STYLE, - 'Multiple variables in one declaration': - IssueType.CODE_STYLE, - 'Nested method call': - IssueType.CODE_STYLE, - 'Null value for Optional type': - IssueType.CODE_STYLE, - 'Objects.equals() can be replaced with equals()': - IssueType.CODE_STYLE, - '\'Optional\' contains array or collection': - IssueType.CODE_STYLE, - 'Optional.isPresent() can be replaced with functional-style expression': - IssueType.CODE_STYLE, - 'Raw type can be generic': - IssueType.CODE_STYLE, - 'Redundant \'new\' expression in constant array creation': - IssueType.CODE_STYLE, - 'Redundant field initialization': - IssueType.CODE_STYLE, - 'Redundant interface declaration': - IssueType.CODE_STYLE, - 'Redundant no-arg constructor': - IssueType.CODE_STYLE, - '\'return\' separated from the result computation': - IssueType.CODE_STYLE, - 'Return of \'this\'': - IssueType.CODE_STYLE, - 'Simplifiable annotation': - IssueType.CODE_STYLE, - 'Single-element annotation': - IssueType.CODE_STYLE, - '\'size() == 0\' replaceable with \'isEmpty()\'': - IssueType.CODE_STYLE, - 'Standard Charset object can be used': - IssueType.CODE_STYLE, - 'Stream API call chain can be replaced with loop': - IssueType.CODE_STYLE, - 'Subsequent steps can be fused into Stream API chain': - IssueType.CODE_STYLE, - '\'try\' statement with multiple resources can be split': - IssueType.CODE_STYLE, - 'Type parameter explicitly extends \'java.lang.Object\'': - IssueType.CODE_STYLE, - 'Unclear expression': - IssueType.CODE_STYLE, - 'Unnecessarily qualified inner class access': - IssueType.CODE_STYLE, - 'Unnecessarily qualified static access': - IssueType.CODE_STYLE, - 'Unnecessarily qualified statically imported element': - IssueType.CODE_STYLE, - 'Unnecessary \'final\' on local variable or parameter': - IssueType.CODE_STYLE, - 'Unnecessary \'null\' check before \'equals()\' call': - IssueType.CODE_STYLE, - 'Unnecessary \'super\' qualifier': - IssueType.CODE_STYLE, - 'Unnecessary \'this\' qualifier': - IssueType.CODE_STYLE, - 'Unnecessary call to \'super()\'': - IssueType.CODE_STYLE, - 'Unnecessary call to \'toString()\'': - IssueType.CODE_STYLE, - 'Unnecessary code block': - IssueType.CODE_STYLE, - 'Unnecessary conversion to String': - IssueType.CODE_STYLE, - 'Unnecessary enum modifier': - IssueType.CODE_STYLE, - 'Unnecessary fully qualified name': - IssueType.CODE_STYLE, - 'Unnecessary interface modifier': - IssueType.CODE_STYLE, - 'Unnecessary parentheses': - IssueType.CODE_STYLE, - 'Unnecessary qualifier for \'this\' or \'super\'': - IssueType.CODE_STYLE, - 'Unnecessary semicolon': - IssueType.CODE_STYLE, - 'Unqualified inner class access': - IssueType.CODE_STYLE, - 'Unqualified static access': - IssueType.CODE_STYLE, - - # Java | Control flow issues - 'Assertion can be replaced with if statement': - IssueType.ERROR_PRONE, - 'Boolean expression could be replaced with conditional expression': - IssueType.BEST_PRACTICES, - '\'break\' statement': - IssueType.BEST_PRACTICES, - '\'break\' statement with label': - IssueType.BEST_PRACTICES, - 'Conditional break inside infinite loop': - IssueType.BEST_PRACTICES, - 'Conditional can be pushed inside branch expression': - IssueType.BEST_PRACTICES, - 'Conditional expression (?:)': - IssueType.BEST_PRACTICES, - 'Conditional expression with identical branches': - IssueType.BEST_PRACTICES, - 'Conditional expression with negated condition': - IssueType.BEST_PRACTICES, - 'Constant conditional expression': - IssueType.BEST_PRACTICES, - '\'continue\' statement': - IssueType.BEST_PRACTICES, - '\'continue\' statement with label': - IssueType.BEST_PRACTICES, - '\'default\' not last case in \'switch\' statement': - IssueType.BEST_PRACTICES, - 'Double negation': - IssueType.BEST_PRACTICES, - 'Duplicate condition in \'if\' statement': - IssueType.BEST_PRACTICES, - 'Duplicate condition on \'&&\' or \'||\'': - IssueType.BEST_PRACTICES, - 'Enum \'switch\' statement that misses case': - IssueType.BEST_PRACTICES, - 'Fallthrough in \'switch\' statement': - IssueType.BEST_PRACTICES, - '\'for\' loop may be replaced with \'while\' loop': - IssueType.BEST_PRACTICES, - '\'for\' loop with missing components': - IssueType.BEST_PRACTICES, - 'Idempotent loop body': - IssueType.BEST_PRACTICES, - '\'if\' statement could be replaced with conditional expression': - IssueType.BEST_PRACTICES, - '\'if\' statement with common parts': - IssueType.BEST_PRACTICES, - '\'if\' statement with negated condition': - IssueType.BEST_PRACTICES, - '\'if\' statement with too many branches': - IssueType.BEST_PRACTICES, - 'Infinite loop statement': - IssueType.BEST_PRACTICES, - 'Labeled statement': - IssueType.BEST_PRACTICES, - 'Local variable used and declared in different \'switch\' branches': - IssueType.BEST_PRACTICES, - 'Loop statement that does not loop': - IssueType.BEST_PRACTICES, - 'Loop variable not updated inside loop': - IssueType.ERROR_PRONE, - 'Loop with implicit termination condition': - IssueType.BEST_PRACTICES, - 'Negated conditional expression': - IssueType.BEST_PRACTICES, - 'Negated equality expression': - IssueType.BEST_PRACTICES, - 'Nested \'switch\'': - IssueType.BEST_PRACTICES, - 'Nested conditional expression': - IssueType.BEST_PRACTICES, - 'Overly complex boolean expression': - IssueType.BEST_PRACTICES, - 'Pointless \'indexOf()\' comparison': - IssueType.BEST_PRACTICES, - 'Pointless boolean expression': - IssueType.BEST_PRACTICES, - 'Redundant \'else\'': - IssueType.BEST_PRACTICES, - 'Redundant \'if\' statement': - IssueType.BEST_PRACTICES, - 'Redundant conditional expression': - IssueType.BEST_PRACTICES, - 'Simplifiable boolean expression': - IssueType.BEST_PRACTICES, - 'Simplifiable conditional expression': - IssueType.BEST_PRACTICES, - 'Statement can be replaced with \'assert\' or \'Objects.requireNonNull\'': - IssueType.BEST_PRACTICES, - '\'switch\' statement': - IssueType.BEST_PRACTICES, - '\'switch\' statement with too few branches': - IssueType.BEST_PRACTICES, - '\'switch\' statement with too low of a branch density': - IssueType.BEST_PRACTICES, - '\'switch\' statement with too many branches': - IssueType.BEST_PRACTICES, - '\'switch\' statement without \'default\' branch': - IssueType.BEST_PRACTICES, - 'Unnecessary \'null\' check before method call': - IssueType.BEST_PRACTICES, - - # Java | Data flow - 'Boolean method is always inverted': - IssueType.BEST_PRACTICES, - 'Boolean variable is always inverted': - IssueType.BEST_PRACTICES, - 'Method call violates Law of Demeter': - IssueType.BEST_PRACTICES, - 'Negatively named boolean variable': - IssueType.BEST_PRACTICES, - 'Redundant local variable': - IssueType.BEST_PRACTICES, - 'Reuse of local variable': - IssueType.BEST_PRACTICES, - 'Scope of variable is too broad': - IssueType.BEST_PRACTICES, - 'Use of variable whose value is known to be constant': - IssueType.BEST_PRACTICES, - - # Java | Declaration redundancy - 'Access static member via instance reference': - IssueType.BEST_PRACTICES, - 'Actual method parameter is the same constant': - IssueType.BEST_PRACTICES, - 'Collector can be simplified': - IssueType.BEST_PRACTICES, - 'Declaration access can be weaker': - IssueType.BEST_PRACTICES, - 'Declaration can have final modifier': - IssueType.BEST_PRACTICES, - 'Default annotation parameter value': - IssueType.BEST_PRACTICES, - 'Duplicate throws': - IssueType.BEST_PRACTICES, - 'Empty method': - IssueType.BEST_PRACTICES, - 'Functional expression can be folded': - IssueType.BEST_PRACTICES, - 'Method can be void': - IssueType.BEST_PRACTICES, - 'Method returns the same value': - IssueType.BEST_PRACTICES, - 'Null-check method is called with obviously non-null argument': - IssueType.BEST_PRACTICES, - 'Optional call chain can be simplified': - IssueType.BEST_PRACTICES, - 'Redundant \'close()\'': - IssueType.BEST_PRACTICES, - 'Redundant \'requires\' statement in module-info': - IssueType.BEST_PRACTICES, - 'Redundant \'throws\' clause': - IssueType.BEST_PRACTICES, - 'Redundant lambda parameter types': - IssueType.BEST_PRACTICES, - 'Redundant operation on empty container': - IssueType.BEST_PRACTICES, - 'Redundant step in Stream or Optional call chain': - IssueType.BEST_PRACTICES, - 'Stream API call chain can be simplified': - IssueType.BEST_PRACTICES, - 'Trivial usage of functional expression': - IssueType.BEST_PRACTICES, - 'Unnecessary module dependency': - IssueType.BEST_PRACTICES, - 'Unused declaration': - IssueType.BEST_PRACTICES, - 'Unused label': - IssueType.BEST_PRACTICES, - 'Unused library': - IssueType.BEST_PRACTICES, - 'Variable is assigned to itself': - IssueType.BEST_PRACTICES, - 'Wrapper type may be primitive': - IssueType.BEST_PRACTICES, - - # Java | Dependency issues - 'Class with too many dependencies': - IssueType.BEST_PRACTICES, - 'Class with too many dependents': - IssueType.BEST_PRACTICES, - 'Class with too many transitive dependencies': - IssueType.BEST_PRACTICES, - 'Class with too many transitive dependents': - IssueType.BEST_PRACTICES, - 'Cyclic class dependency': - IssueType.BEST_PRACTICES, - 'Cyclic package dependency': - IssueType.BEST_PRACTICES, - 'Illegal package dependencies': - IssueType.ERROR_PRONE, - - # Java | Encapsulation - 'Accessing a non-public field of another object': - IssueType.BEST_PRACTICES, - 'Assignment or return of field with mutable type': - IssueType.BEST_PRACTICES, - 'Package-visible field': - IssueType.BEST_PRACTICES, - 'Package-visible nested class': - IssueType.BEST_PRACTICES, - 'Protected field': - IssueType.BEST_PRACTICES, - 'Protected nested class': - IssueType.BEST_PRACTICES, - '\'public\' field': - IssueType.BEST_PRACTICES, - '\'public\' nested class': - IssueType.BEST_PRACTICES, - - # Java | Error handling - 'Catch block may ignore exception': - IssueType.ERROR_PRONE, - 'Caught exception is immediately rethrown': - IssueType.BEST_PRACTICES, - 'Checked exception class': - IssueType.BEST_PRACTICES, - 'Class directly extends \'java.lang.Throwable\'': - IssueType.BEST_PRACTICES, - '\'continue\' or \'break\' inside \'finally\' block': - IssueType.ERROR_PRONE, - 'Empty \'finally\' block': - IssueType.BEST_PRACTICES, - 'Empty \'try\' block': - IssueType.BEST_PRACTICES, - 'Exception constructor called without arguments': - IssueType.BEST_PRACTICES, - '\'finally\' block which can not complete normally': - IssueType.ERROR_PRONE, - '\'instanceof\' on \'catch\' parameter': - IssueType.BEST_PRACTICES, - '\'java.lang.Error\' not rethrown': - IssueType.ERROR_PRONE, - '\'java.lang.ThreadDeath\' not rethrown': - IssueType.ERROR_PRONE, - 'Nested \'try\' statement': - IssueType.BEST_PRACTICES, - 'Non-final field of exception class': - IssueType.BEST_PRACTICES, - '\'null\' thrown': - IssueType.ERROR_PRONE, - 'Overly broad \'catch\' block': - IssueType.BEST_PRACTICES, - 'Overly broad \'throws\' clause': - IssueType.BEST_PRACTICES, - 'Prohibited exception caught': - IssueType.ERROR_PRONE, - 'Prohibited exception declared': - IssueType.ERROR_PRONE, - 'Prohibited exception thrown': - IssueType.ERROR_PRONE, - '\'return\' inside \'finally\' block': - IssueType.BEST_PRACTICES, - '\'throw\' caught by containing \'try\' statement': - IssueType.ERROR_PRONE, - '\'throw\' inside \'catch\' block which ignores the caught exception': - IssueType.ERROR_PRONE, - '\'throw\' inside \'finally\' block': - IssueType.ERROR_PRONE, - 'Unchecked exception class': - IssueType.BEST_PRACTICES, - 'Unchecked exception declared in \'throws\' clause': - IssueType.BEST_PRACTICES, - 'Unnecessary call to \'Throwable.initCause()\'': - IssueType.BEST_PRACTICES, - - # Java | Finalization - '\'finalize()\' called explicitly': - IssueType.BEST_PRACTICES, - '\'finalize()\' declaration': - IssueType.BEST_PRACTICES, - '\'finalize()\' not declared \'protected\'': - IssueType.BEST_PRACTICES, - - # Java | General - 'Test-only class or method call in production code': - IssueType.BEST_PRACTICES, - - # Java | Imports - '\'*\' import': - IssueType.BEST_PRACTICES, - 'Import from same package': - IssueType.BEST_PRACTICES, - '\'java.lang\' import': - IssueType.BEST_PRACTICES, - 'Single class import': - IssueType.BEST_PRACTICES, - 'Static import': - IssueType.BEST_PRACTICES, - 'Unused import': - IssueType.BEST_PRACTICES, - - # Java | Inheritance issues - 'Abstract class extends concrete class': - IssueType.BEST_PRACTICES, - 'Abstract class which has no concrete subclass': - IssueType.BEST_PRACTICES, - 'Abstract class without abstract methods': - IssueType.BEST_PRACTICES, - 'Abstract method overrides abstract method': - IssueType.BEST_PRACTICES, - 'Abstract method overrides concrete method': - IssueType.BEST_PRACTICES, - 'Abstract method with missing implementations': - IssueType.BEST_PRACTICES, - 'Class explicitly extends a Collection class': - IssueType.BEST_PRACTICES, - 'Class extends annotation interface': - IssueType.BEST_PRACTICES, - 'Class extends utility class': - IssueType.BEST_PRACTICES, - 'Class may extend a commonly used base class': - IssueType.BEST_PRACTICES, - 'Final declaration can\'t be overridden at runtime': - IssueType.ERROR_PRONE, - 'Interface which has no concrete subclass': - IssueType.BEST_PRACTICES, - 'Method does not call super method': - IssueType.BEST_PRACTICES, - 'Method is identical to its super method': - IssueType.BEST_PRACTICES, - 'Missing @Override annotation': - IssueType.BEST_PRACTICES, - 'Non-varargs method overrides varargs method': - IssueType.BEST_PRACTICES, - 'Parameter type prevents overriding': - IssueType.BEST_PRACTICES, - '\'public\' constructor in \'abstract\' class': - IssueType.BEST_PRACTICES, - 'Static inheritance': - IssueType.BEST_PRACTICES, - 'Type parameter extends final class': - IssueType.BEST_PRACTICES, - - # Java | Initialization - 'Abstract method called during object construction': - IssueType.ERROR_PRONE, - 'Double brace initialization': - IssueType.ERROR_PRONE, - 'Instance field may not be initialized': - IssueType.ERROR_PRONE, - 'Instance field used before initialization': - IssueType.ERROR_PRONE, - 'Non-final static field is used during class initialization': - IssueType.ERROR_PRONE, - 'Overridable method called during object construction': - IssueType.ERROR_PRONE, - 'Overridden method called during object construction': - IssueType.ERROR_PRONE, - 'Static field may not be initialized': - IssueType.ERROR_PRONE, - 'Static field used before initialization': - IssueType.ERROR_PRONE, - '\'this\' reference escaped in object construction': - IssueType.ERROR_PRONE, - 'Unsafe lazy initialization of \'static\' field': - IssueType.ERROR_PRONE, - - # Java | JUnit - '\'assertEquals()\' between objects of inconvertible types': - IssueType.ERROR_PRONE, - '\'assertEquals()\' called on array': - IssueType.ERROR_PRONE, - '\'assertEquals()\' may be \'assertSame()\'': - IssueType.BEST_PRACTICES, - 'Assertion expression can be replaced with \'assertThat\' method call': - IssueType.BEST_PRACTICES, - 'Constant JUnit assert argument': - IssueType.ERROR_PRONE, - 'Expected exception never thrown in test method body': - IssueType.ERROR_PRONE, - 'Highlight problem line in test': - IssueType.BEST_PRACTICES, - 'JUnit test annotated with \'@Ignore\'/\'@Disabled\'': - IssueType.BEST_PRACTICES, - 'JUnit test method in product source': - IssueType.BEST_PRACTICES, - 'JUnit test method without any assertions': - IssueType.ERROR_PRONE, - 'JUnit TestCase in product source': - IssueType.BEST_PRACTICES, - 'JUnit TestCase with non-trivial constructors': - IssueType.BEST_PRACTICES, - 'JUnit 4 test can be JUnit 5': - IssueType.BEST_PRACTICES, - 'JUnit 4 test method in class extending JUnit 3 TestCase': - IssueType.BEST_PRACTICES, - 'JUnit 5 malformed @Nested class': - IssueType.BEST_PRACTICES, - 'JUnit 5 malformed parameterized test': - IssueType.BEST_PRACTICES, - 'JUnit 5 malformed repeated test': - IssueType.BEST_PRACTICES, - 'Malformed \'setUp()\' or \'tearDown()\' method': - IssueType.BEST_PRACTICES, - 'Malformed @Before or @After method': - IssueType.BEST_PRACTICES, - 'Malformed @BeforeClass/@BeforeAll or @AfterClass/@AfterAll method': - IssueType.BEST_PRACTICES, - 'Malformed @DataPoint field': - IssueType.BEST_PRACTICES, - 'Malformed @Rule/@ClassRule field': - IssueType.BEST_PRACTICES, - 'Malformed test method': - IssueType.BEST_PRACTICES, - 'Message missing on JUnit assertion': - IssueType.BEST_PRACTICES, - 'Misordered \'assertEquals()\' arguments': - IssueType.BEST_PRACTICES, - 'Multiple exceptions declared on test method': - IssueType.BEST_PRACTICES, - 'Obsolete assertions in JUnit 5 test': - IssueType.BEST_PRACTICES, - 'Old style JUnit test method in JUnit 4 class': - IssueType.BEST_PRACTICES, - '@RunWith(JUnitPlatform.class) without test methods': - IssueType.BEST_PRACTICES, - '@RunWith(Parameterized.class) without data provider': - IssueType.BEST_PRACTICES, - 'Simplifiable JUnit assertion': - IssueType.BEST_PRACTICES, - '\'suite()\' method not declared \'static\'': - IssueType.ERROR_PRONE, - '\'super.tearDown()\' not called from \'finally\' block': - IssueType.ERROR_PRONE, - 'Test class with no test': - IssueType.ERROR_PRONE, - 'Unconstructable JUnit TestCase': - IssueType.ERROR_PRONE, - 'Usage of obsolete \'junit.framework.Assert\' method': - IssueType.BEST_PRACTICES, - - # Java | Logging - 'Class with multiple loggers': - IssueType.ERROR_PRONE, - 'Class without logger': - IssueType.BEST_PRACTICES, - 'Log condition does not match logging call': - IssueType.BEST_PRACTICES, - 'Logger initialized with foreign class': - IssueType.BEST_PRACTICES, - 'Logging call not guarded by log condition': - IssueType.BEST_PRACTICES, - 'Non-constant logger': - IssueType.BEST_PRACTICES, - 'Non-constant string concatenation as argument to logging call': - IssueType.BEST_PRACTICES, - 'Number of placeholders does not match number of arguments in logging call': - IssueType.BEST_PRACTICES, - '\'public\' method without logging': - IssueType.BEST_PRACTICES, - - # Java | Memory - 'Anonymous class may be a named \'static\' inner class': - IssueType.BEST_PRACTICES, - 'Calls to \'System.gc()\' or \'Runtime.gc()\'': - IssueType.BEST_PRACTICES, - 'Inner class may be \'static\'': - IssueType.BEST_PRACTICES, - 'Return of instance of anonymous, local or inner class': - IssueType.BEST_PRACTICES, - 'Static collection': - IssueType.BEST_PRACTICES, - 'StringBuilder field': - IssueType.BEST_PRACTICES, - 'Unnecessary zero length array usage': - IssueType.BEST_PRACTICES, - 'Zero-length array allocation': - IssueType.BEST_PRACTICES, - - # Java | Method metrics - 'Constructor with too many parameters': - IssueType.BEST_PRACTICES, - 'Method with more than three negations': - IssueType.BEST_PRACTICES, - 'Method with multiple loops': - IssueType.BEST_PRACTICES, - 'Method with multiple return points': - IssueType.BEST_PRACTICES, - 'Method with too many exceptions declared': - IssueType.BEST_PRACTICES, - 'Method with too many parameters': - IssueType.BEST_PRACTICES, - 'Overly complex method': - IssueType.BEST_PRACTICES, - 'Overly coupled method': - IssueType.BEST_PRACTICES, - 'Overly long lambda expression': - IssueType.BEST_PRACTICES, - 'Overly long method': - IssueType.BEST_PRACTICES, - 'Overly nested method': - IssueType.BEST_PRACTICES, - 'Class independent of its module': - IssueType.BEST_PRACTICES, - 'Class only used from one other module': - IssueType.BEST_PRACTICES, - 'Inconsistent language level settings': - IssueType.BEST_PRACTICES, - 'Module with too few classes': - IssueType.BEST_PRACTICES, - 'Module with too many classes': - IssueType.BEST_PRACTICES, - - # Java | Naming conventions - 'Boolean method name must start with question word': - IssueType.CODE_STYLE, - 'Class name prefixed with package name': - IssueType.CODE_STYLE, - 'Class name same as ancestor name': - IssueType.CODE_STYLE, - 'Class naming convention': - IssueType.CODE_STYLE, - 'Confusing \'main()\' method': - IssueType.CODE_STYLE, - 'Exception class name does not end with \'Exception\'': - IssueType.CODE_STYLE, - 'Field naming convention': - IssueType.CODE_STYLE, - 'Java module naming conventions': - IssueType.CODE_STYLE, - 'Lambda-unfriendly method overload': - IssueType.CODE_STYLE, - 'Lambda parameter naming convention': - IssueType.CODE_STYLE, - 'Local variable naming convention': - IssueType.CODE_STYLE, - 'Method name same as class name': - IssueType.CODE_STYLE, - 'Method name same as parent class name': - IssueType.CODE_STYLE, - 'Method names differing only by case': - IssueType.CODE_STYLE, - 'Method naming convention': - IssueType.CODE_STYLE, - 'Method parameter naming convention': - IssueType.CODE_STYLE, - 'Non-boolean method name must not start with question word': - IssueType.CODE_STYLE, - 'Non-constant field with upper-case name': - IssueType.CODE_STYLE, - 'Non-exception class name ends with \'Exception\'': - IssueType.CODE_STYLE, - 'Overloaded methods with same number of parameters': - IssueType.CODE_STYLE, - 'Overloaded varargs method': - IssueType.CODE_STYLE, - 'Package naming convention': - IssueType.CODE_STYLE, - 'Parameter name differs from parameter in overridden method': - IssueType.CODE_STYLE, - 'Questionable name': - IssueType.CODE_STYLE, - 'Standard variable names': - IssueType.CODE_STYLE, - 'Use of \'$\' in identifier': - IssueType.CODE_STYLE, - - # Java | Numeric issues - 'Call to \'BigDecimal\' method without a rounding mode argument': - IssueType.ERROR_PRONE, - '\'char\' expression used in arithmetic context': - IssueType.ERROR_PRONE, - 'Comparison of \'short\' and \'char\' values': - IssueType.ERROR_PRONE, - 'Comparison to Double.NaN or Float.NaN': - IssueType.ERROR_PRONE, - 'Confusing floating-point literal': - IssueType.ERROR_PRONE, - 'Constant call to \'java.lang.Math\'': - IssueType.ERROR_PRONE, - 'Divide by zero': - IssueType.ERROR_PRONE, - '\'double\' literal cast to \'float\' could be \'float\' literal': - IssueType.ERROR_PRONE, - '\'equals()\' called on \'java.math.BigDecimal\'': - IssueType.ERROR_PRONE, - 'Floating point equality comparison': - IssueType.ERROR_PRONE, - 'Implicit numeric conversion': - IssueType.ERROR_PRONE, - '\'int\' literal cast to \'long\' could be \'long\' literal': - IssueType.ERROR_PRONE, - 'Integer division in floating point context': - IssueType.ERROR_PRONE, - 'Integer multiplication or shift implicitly cast to long': - IssueType.ERROR_PRONE, - '\'long\' literal ending with \'l\' instead of \'L\'': - IssueType.ERROR_PRONE, - 'Non-reproducible call to \'java.lang.Math\'': - IssueType.BEST_PRACTICES, - 'Number constructor call with primitive argument': - IssueType.ERROR_PRONE, - 'Numeric cast that loses precision': - IssueType.ERROR_PRONE, - 'Numeric overflow': - IssueType.ERROR_PRONE, - 'Octal and decimal integers in same array': - IssueType.ERROR_PRONE, - 'Octal integer': - IssueType.ERROR_PRONE, - 'Overly complex arithmetic expression': - IssueType.ERROR_PRONE, - 'Pointless arithmetic expression': - IssueType.BEST_PRACTICES, - 'Suspicious test for oddness': - IssueType.ERROR_PRONE, - 'Suspicious underscore in number literal': - IssueType.ERROR_PRONE, - 'Unary plus': - IssueType.ERROR_PRONE, - 'Unnecessary explicit numeric cast': - IssueType.ERROR_PRONE, - 'Unnecessary unary minus': - IssueType.ERROR_PRONE, - 'Unpredictable BigDecimal constructor call': - IssueType.ERROR_PRONE, - - # Java | Packaging issues - 'Class independent of its package': - IssueType.BEST_PRACTICES, - 'Class only used from one other package': - IssueType.BEST_PRACTICES, - 'Empty directory': - IssueType.BEST_PRACTICES, - 'Exception package': - IssueType.BEST_PRACTICES, - 'Package with classes in multiple modules': - IssueType.BEST_PRACTICES, - 'Package with disjoint dependency graph': - IssueType.BEST_PRACTICES, - 'Package with too few classes': - IssueType.BEST_PRACTICES, - 'Package with too many classes': - IssueType.BEST_PRACTICES, - - # Java | Performance - 'Boolean constructor call': - IssueType.BEST_PRACTICES, - 'Boxing of already boxed value': - IssueType.BEST_PRACTICES, - 'Bulk operation can be used instead of iteration': - IssueType.BEST_PRACTICES, - 'Call to \'Arrays.asList()\' with too few arguments': - IssueType.BEST_PRACTICES, - 'Call to simple getter from within class': - IssueType.BEST_PRACTICES, - 'Call to simple setter from within class': - IssueType.BEST_PRACTICES, - 'Class initializer may be \'static\'': - IssueType.BEST_PRACTICES, - '\'Collection.toArray()\' call style': - IssueType.BEST_PRACTICES, - 'Collection without initial capacity': - IssueType.BEST_PRACTICES, - 'Concatenation with empty string': - IssueType.BEST_PRACTICES, - 'Dynamic regular expression could be replaced by compiled Pattern': - IssueType.BEST_PRACTICES, - '\'equals()\' call can be replaced with \'==\'': - IssueType.BEST_PRACTICES, - '\'equals()\' or \'hashCode()\' called on \'java.net.URL\' object': - IssueType.BEST_PRACTICES, - 'Explicit argument can be lambda': - IssueType.BEST_PRACTICES, - 'Field may be \'static\'': - IssueType.BEST_PRACTICES, - 'Inefficient Stream API call chains ending with count()': - IssueType.BEST_PRACTICES, - 'Instantiating object to get Class object': - IssueType.BEST_PRACTICES, - 'Iteration over \'keySet()\' may be optimized': - IssueType.BEST_PRACTICES, - '\'List.remove()\' called in loop': - IssueType.BEST_PRACTICES, - 'Loop can be terminated after condition is met': - IssueType.BEST_PRACTICES, - 'Manual array copy': - IssueType.BEST_PRACTICES, - 'Manual array to collection copy': - IssueType.BEST_PRACTICES, - 'Map or Set may contain \'java.net.URL\' objects': - IssueType.BEST_PRACTICES, - 'Map replaceable with EnumMap': - IssueType.BEST_PRACTICES, - 'Method may be \'static\'': - IssueType.BEST_PRACTICES, - 'Non-constant String should be StringBuilder': - IssueType.BEST_PRACTICES, - 'Object allocation in loop': - IssueType.BEST_PRACTICES, - 'Object instantiation inside \'equals()\' or \'hashCode()\'': - IssueType.BEST_PRACTICES, - 'Redundant \'Collection.addAll()\' call': - IssueType.BEST_PRACTICES, - 'Redundant call to \'String.format()\'': - IssueType.BEST_PRACTICES, - 'Set replaceable with EnumSet': - IssueType.BEST_PRACTICES, - 'Single character string argument in \'String.indexOf()\' call': - IssueType.BEST_PRACTICES, - 'Single character string concatenation': - IssueType.BEST_PRACTICES, - '\'String.equals('')\'': - IssueType.BEST_PRACTICES, - 'String concatenation as argument to \'StringBuilder.append()\' call': - IssueType.BEST_PRACTICES, - 'String concatenation in loop': - IssueType.BEST_PRACTICES, - '\'StringBuilder.toString()\' in concatenation': - IssueType.BEST_PRACTICES, - 'StringBuilder without initial capacity': - IssueType.BEST_PRACTICES, - 'Tail recursion': - IssueType.BEST_PRACTICES, - 'Unnecessary temporary object in conversion from String': - IssueType.BEST_PRACTICES, - 'Unnecessary temporary object in conversion to String': - IssueType.BEST_PRACTICES, - 'Using \'Random.nextDouble()\' to get random integer': - IssueType.BEST_PRACTICES, - - # Java | Portability - 'Call to \'Runtime.exec()\'': - IssueType.ERROR_PRONE, - 'Call to \'System.exit()\' or related methods': - IssueType.ERROR_PRONE, - 'Call to \'System.getenv()\'': - IssueType.ERROR_PRONE, - 'Hardcoded file separator': - IssueType.ERROR_PRONE, - 'Hardcoded line separator': - IssueType.ERROR_PRONE, - 'Native method': - IssueType.ERROR_PRONE, - 'Use of \'java.lang.ProcessBuilder\' class': - IssueType.ERROR_PRONE, - 'Use of AWT peer class': - IssueType.ERROR_PRONE, - 'Use of concrete JDBC driver class': - IssueType.ERROR_PRONE, - 'Use of sun.* classes': - IssueType.ERROR_PRONE, - - # Java | Probable bugs - 'Array comparison using \'==\', instead of \'Arrays.equals()\'': - IssueType.ERROR_PRONE, - '\'assert\' statement condition is constant': - IssueType.ERROR_PRONE, - '\'assert\' statement with side effects': - IssueType.ERROR_PRONE, - 'Call to \'toString()\' on array': - IssueType.ERROR_PRONE, - 'Call to default \'toString()\'': - IssueType.ERROR_PRONE, - 'Call to String.replaceAll(\'.\', ...)': - IssueType.ERROR_PRONE, - 'Cast conflicts with \'instanceof\'': - IssueType.ERROR_PRONE, - 'Casting to incompatible interface': - IssueType.ERROR_PRONE, - 'Class.getClass() call': - IssueType.ERROR_PRONE, - 'Cleaner captures object reference': - IssueType.ERROR_PRONE, - 'Collection added to self': - IssueType.ERROR_PRONE, - 'Comparable implemented but \'equals()\' not overridden': - IssueType.ERROR_PRONE, - 'Confusing argument to varargs method': - IssueType.ERROR_PRONE, - 'Confusing primitive array argument to varargs method': - IssueType.ERROR_PRONE, - 'Constant conditions & exceptions': - IssueType.ERROR_PRONE, - 'Contract issues': - IssueType.ERROR_PRONE, - 'Copy constructor misses field': - IssueType.ERROR_PRONE, - 'Covariant \'equals()\'': - IssueType.ERROR_PRONE, - 'Duplicated delimiters in java.util.StringTokenizer': - IssueType.ERROR_PRONE, - 'Empty class initializer': - IssueType.ERROR_PRONE, - '\'equal()\' instead of \'equals()\'': - IssueType.ERROR_PRONE, - '\'equals()\' and \'hashCode()\' not paired': - IssueType.ERROR_PRONE, - '\'equals()\' between objects of inconvertible types': - IssueType.ERROR_PRONE, - '\'equals()\' called on array': - IssueType.ERROR_PRONE, - '\'equals()\' called on itself': - IssueType.ERROR_PRONE, - '\'equals()\' called on StringBuilder': - IssueType.ERROR_PRONE, - '\'equals()\' method which does not check class of parameter': - IssueType.ERROR_PRONE, - '\'hashCode()\' called on array': - IssueType.ERROR_PRONE, - 'Infinite recursion': - IssueType.ERROR_PRONE, - 'Inner class referenced via subclass': - IssueType.ERROR_PRONE, - '\'instanceof\' with incompatible interface': - IssueType.ERROR_PRONE, - 'Instantiation of utility class': - IssueType.ERROR_PRONE, - 'Invalid method reference used for Comparator': - IssueType.ERROR_PRONE, - 'Iterable is used as vararg': - IssueType.ERROR_PRONE, - '\'Iterator.hasNext()\' which calls \'next()\'': - IssueType.ERROR_PRONE, - '\'Iterator.next()\' which can\'t throw \'NoSuchElementException\'': - IssueType.ERROR_PRONE, - 'Loop executes zero or billions times': - IssueType.ERROR_PRONE, - 'Magic Constant': - IssueType.ERROR_PRONE, - 'Malformed format string': - IssueType.ERROR_PRONE, - 'Malformed regular expression': - IssueType.ERROR_PRONE, - 'Malformed XPath expression': - IssueType.ERROR_PRONE, - '\'Math.random()\' cast to \'int\'': - IssueType.ERROR_PRONE, - 'Mismatched query and update of collection': - IssueType.ERROR_PRONE, - 'Mismatched query and update of StringBuilder': - IssueType.ERROR_PRONE, - 'Mismatched read and write of array': - IssueType.ERROR_PRONE, - 'New object is compared using \'==\'': - IssueType.ERROR_PRONE, - 'Non-final field referenced in \'compareTo()\'': - IssueType.ERROR_PRONE, - 'Non-final field referenced in \'equals()\'': - IssueType.ERROR_PRONE, - 'Non-final field referenced in \'hashCode()\'': - IssueType.ERROR_PRONE, - 'Non-short-circuit boolean expression': - IssueType.ERROR_PRONE, - 'Non-short-circuit operation consumes the infinite stream': - IssueType.ERROR_PRONE, - '@NotNull/@Nullable problems': - IssueType.ERROR_PRONE, - 'Number comparison using \'==\', instead of \'equals()\'': - IssueType.ERROR_PRONE, - 'Object comparison using \'==\', instead of \'equals()\'': - IssueType.ERROR_PRONE, - '\'Objects.equals()\' called on arrays': - IssueType.ERROR_PRONE, - 'Optional.get() is called without isPresent() check': - IssueType.ERROR_PRONE, - 'Overwritten Map key or Set element': - IssueType.ERROR_PRONE, - 'Reference checked for \'null\' is not used inside \'if\'': - IssueType.ERROR_PRONE, - 'Reflective access to a source-only annotation': - IssueType.ERROR_PRONE, - 'Result of method call ignored': - IssueType.ERROR_PRONE, - 'Result of object allocation ignored': - IssueType.ERROR_PRONE, - 'Return of \'null\'': - IssueType.ERROR_PRONE, - 'Sorted collection with non-comparable elements': - IssueType.ERROR_PRONE, - 'Statement with empty body': - IssueType.ERROR_PRONE, - 'Static field referenced via subclass': - IssueType.ERROR_PRONE, - 'Static method referenced via subclass': - IssueType.ERROR_PRONE, - '\'String.equals()\' called with \'CharSequence\' argument': - IssueType.ERROR_PRONE, - 'String comparison using \'==\', instead of \'equals()\'': - IssueType.ERROR_PRONE, - 'String concatenation as argument to \'format()\' call': - IssueType.ERROR_PRONE, - 'String concatenation as argument to \'MessageFormat.format()\' call': - IssueType.ERROR_PRONE, - 'String literal concatenation missing whitespace': - IssueType.ERROR_PRONE, - 'StringBuilder constructor call with \'char\' argument': - IssueType.ERROR_PRONE, - 'Subtraction in \'compareTo()\'': - IssueType.ERROR_PRONE, - 'Suspicious \'Collection.toArray()\' call': - IssueType.ERROR_PRONE, - 'Suspicious \'Comparator.compare()\' implementation': - IssueType.ERROR_PRONE, - 'Suspicious \'List.remove()\' in the loop': - IssueType.ERROR_PRONE, - 'Suspicious \'System.arraycopy()\' call': - IssueType.ERROR_PRONE, - 'Suspicious array cast': - IssueType.ERROR_PRONE, - 'Suspicious Arrays method calls': - IssueType.ERROR_PRONE, - 'Suspicious collections method calls': - IssueType.ERROR_PRONE, - 'Suspicious indentation after control statement without braces': - IssueType.ERROR_PRONE, - 'Suspicious integer division assignment': - IssueType.ERROR_PRONE, - 'Suspicious usage of compare method': - IssueType.ERROR_PRONE, - 'Suspicious variable/parameter name combination': - IssueType.ERROR_PRONE, - 'Text label in \'switch\' statement': - IssueType.ERROR_PRONE, - 'Throwable not thrown': - IssueType.ERROR_PRONE, - 'Unsafe call to \'Class.newInstance()\'': - IssueType.ERROR_PRONE, - 'Unused assignment': - IssueType.BEST_PRACTICES, - 'Use of index 0 in JDBC ResultSet': - IssueType.ERROR_PRONE, - 'Use of Properties object as a Hashtable': - IssueType.ERROR_PRONE, - 'Wrong package statement': - IssueType.ERROR_PRONE, - - # Java | Reflective access - 'MethodHandle/VarHandle type mismatch': - IssueType.ERROR_PRONE, - 'Non-runtime annotation to be used by reflection': - IssueType.ERROR_PRONE, - 'Reflective access across modules issues': - IssueType.ERROR_PRONE, - 'Reflective access to nonexistent/not visible class member': - IssueType.ERROR_PRONE, - 'Reflective invocation arguments mismatch': - IssueType.ERROR_PRONE, - - # Java | Resource management - 'AutoCloseable used without \'try\'-with-resources': - IssueType.BEST_PRACTICES, - 'Channel opened but not safely closed': - IssueType.ERROR_PRONE, - 'Hibernate resource opened but not safely closed': - IssueType.ERROR_PRONE, - 'I/O resource opened but not safely closed': - IssueType.ERROR_PRONE, - 'JDBC resource opened but not safely closed': - IssueType.ERROR_PRONE, - 'JNDI resource opened but not safely closed': - IssueType.ERROR_PRONE, - 'Socket opened but not safely closed': - IssueType.ERROR_PRONE, - 'Use of DriverManager to get JDBC connection': - IssueType.ERROR_PRONE, - - # Java | Security - 'Access of system properties': - IssueType.BEST_PRACTICES, - 'Call to \'Connection.prepare*()\' with non-constant string': - IssueType.BEST_PRACTICES, - 'Call to \'Runtime.exec()\' with non-constant string': - IssueType.BEST_PRACTICES, - 'Call to \'Statement.execute()\' with non-constant string': - IssueType.BEST_PRACTICES, - 'Call to \'System.loadLibrary()\' with non-constant string': - IssueType.BEST_PRACTICES, - 'Call to \'System.setSecurityManager()\'': - IssueType.BEST_PRACTICES, - 'ClassLoader instantiation': - IssueType.BEST_PRACTICES, - 'Cloneable class in secure context': - IssueType.BEST_PRACTICES, - 'Custom ClassLoader': - IssueType.BEST_PRACTICES, - 'Custom SecurityManager': - IssueType.BEST_PRACTICES, - 'Design for extension': - IssueType.BEST_PRACTICES, - 'Insecure random number generation': - IssueType.BEST_PRACTICES, - 'Non-\'static\' inner class in secure context': - IssueType.BEST_PRACTICES, - 'Non-final \'clone()\' in secure context': - IssueType.BEST_PRACTICES, - '\'public static\' array field': - IssueType.BEST_PRACTICES, - '\'public static\' collection field': - IssueType.BEST_PRACTICES, - 'Serializable class in secure context': - IssueType.BEST_PRACTICES, - - # Java | Serialization issues - 'Comparator class not declared Serializable': - IssueType.ERROR_PRONE, - 'Externalizable class with \'readObject()\' or \'writeObject()\'': - IssueType.ERROR_PRONE, - 'Externalizable class without \'public\' no-arg constructor': - IssueType.ERROR_PRONE, - 'Instance field may not be initialized by \'readObject()\'': - IssueType.ERROR_PRONE, - 'Non-serializable class with \'readObject()\' or \'writeObject()\'': - IssueType.ERROR_PRONE, - 'Non-serializable class with \'serialVersionUID\'': - IssueType.ERROR_PRONE, - 'Non-serializable field in a Serializable class': - IssueType.ERROR_PRONE, - 'Non-serializable object bound to HttpSession': - IssueType.ERROR_PRONE, - 'Non-serializable object passed to ObjectOutputStream': - IssueType.ERROR_PRONE, - '\'readObject()\' or \'writeObject()\' not declared \'private\'': - IssueType.ERROR_PRONE, - '\'readResolve()\' or \'writeReplace()\' not declared \'protected\'': - IssueType.ERROR_PRONE, - 'Serializable class with unconstructable ancestor': - IssueType.ERROR_PRONE, - 'Serializable class without \'readObject()\' and \'writeObject()\'': - IssueType.ERROR_PRONE, - 'Serializable class without \'serialVersionUID\'': - IssueType.ERROR_PRONE, - 'Serializable non-\'static\' inner class with non-Serializable outer class': - IssueType.ERROR_PRONE, - 'Serializable non-\'static\' inner class without \'serialVersionUID\'': - IssueType.ERROR_PRONE, - 'Serializable object implicitly stores non-Serializable object': - IssueType.ERROR_PRONE, - '\'serialPersistentFields\' field not declared \'private static final ' - 'ObjectStreamField[]\'': - IssueType.ERROR_PRONE, - '\'serialVersionUID\' field not declared \'private static final long\'': - IssueType.ERROR_PRONE, - 'Transient field in non-serializable class': - IssueType.ERROR_PRONE, - 'Transient field is not initialized on deserialization': - IssueType.ERROR_PRONE, - - # Java | Threading issues - 'Access to static field locked on instance data': - IssueType.ERROR_PRONE, - 'AtomicFieldUpdater field not declared \'static final\'': - IssueType.ERROR_PRONE, - 'AtomicFieldUpdater issues': - IssueType.ERROR_PRONE, - '\'await()\' not in loop': - IssueType.ERROR_PRONE, - '\'await()\' without corresponding \'signal()\'': - IssueType.ERROR_PRONE, - 'Busy wait': - IssueType.ERROR_PRONE, - 'Call to \'notify()\' instead of \'notifyAll()\'': - IssueType.ERROR_PRONE, - 'Call to \'signal()\' instead of \'signalAll()\'': - IssueType.ERROR_PRONE, - 'Call to \'System.runFinalizersOnExit()\'': - IssueType.ERROR_PRONE, - 'Call to \'Thread.run()\'': - IssueType.ERROR_PRONE, - 'Call to \'Thread.setPriority()\'': - IssueType.ERROR_PRONE, - 'Call to \'Thread.sleep()\' while synchronized': - IssueType.ERROR_PRONE, - 'Call to \'Thread.start()\' during object construction': - IssueType.ERROR_PRONE, - 'Call to \'Thread.stop()\', \'suspend()\' or \'resume()\'': - IssueType.ERROR_PRONE, - 'Call to \'Thread.yield()\'': - IssueType.ERROR_PRONE, - 'Call to a native method while locked': - IssueType.ERROR_PRONE, - 'Class directly extends \'java.lang.Thread\'': - IssueType.ERROR_PRONE, - 'Double-checked locking': - IssueType.ERROR_PRONE, - 'Empty \'synchronized\' statement': - IssueType.ERROR_PRONE, - 'Field accessed in both synchronized and unsynchronized contexts': - IssueType.ERROR_PRONE, - 'Instantiating a Thread with default \'run()\' method': - IssueType.ERROR_PRONE, - 'Lock acquired but not safely unlocked': - IssueType.ERROR_PRONE, - 'Method with synchronized block could be synchronized method': - IssueType.ERROR_PRONE, - 'Nested \'synchronized\' statement': - IssueType.ERROR_PRONE, - 'Non-atomic operation on volatile field': - IssueType.ERROR_PRONE, - 'Non-private field accessed in synchronized context': - IssueType.ERROR_PRONE, - 'Non thread-safe static field access': - IssueType.ERROR_PRONE, - '\'notify()\' or \'notifyAll()\' called on ' - '\'java.util.concurrent.locks.Condition\' object': - IssueType.ERROR_PRONE, - '\'notify()\' or \'notifyAll()\' without corresponding state change': - IssueType.ERROR_PRONE, - '\'notify()\' without corresponding \'wait()\'': - IssueType.ERROR_PRONE, - '\'signal()\' without corresponding \'await()\'': - IssueType.ERROR_PRONE, - 'Static initializer references subclass': - IssueType.ERROR_PRONE, - 'Synchronization on \'getClass()\'': - IssueType.ERROR_PRONE, - 'Synchronization on \'static\' field': - IssueType.ERROR_PRONE, - 'Synchronization on \'this\'': - IssueType.ERROR_PRONE, - 'Synchronization on a Lock object': - IssueType.ERROR_PRONE, - 'Synchronization on a non-final field': - IssueType.ERROR_PRONE, - 'Synchronization on an object initialized with a literal': - IssueType.ERROR_PRONE, - 'Synchronization on local variable or method parameter': - IssueType.ERROR_PRONE, - '\'synchronized\' method': - IssueType.ERROR_PRONE, - 'ThreadLocal field not declared static final': - IssueType.ERROR_PRONE, - '\'ThreadLocalRandom\' instance might be shared': - IssueType.ERROR_PRONE, - 'Unconditional \'wait()\' call': - IssueType.ERROR_PRONE, - 'Unsynchronized method overrides synchronized method': - IssueType.ERROR_PRONE, - 'Volatile array field': - IssueType.ERROR_PRONE, - '\'wait()\' called on \'java.util.concurrent.locks.Condition\' object': - IssueType.ERROR_PRONE, - '\'wait()\' not in loop': - IssueType.ERROR_PRONE, - '\'wait()\' or \'await()\' without timeout': - IssueType.ERROR_PRONE, - '\'wait()\' or \'notify()\' while not synchronized': - IssueType.ERROR_PRONE, - '\'wait()\' while holding two locks': - IssueType.ERROR_PRONE, - '\'wait()\' without corresponding \'notify()\'': - IssueType.ERROR_PRONE, - '\'while\' loop spins on field': - IssueType.ERROR_PRONE, - - # Java | toString() issues - 'Class does not override \'toString()\' method': - IssueType.ERROR_PRONE, - 'Field not used in \'toString()\' method': - IssueType.ERROR_PRONE, - - # Java | Verbose or redundant code constructs - 'Comparator can be simplified': - IssueType.BEST_PRACTICES, - 'Condition is covered by further condition': - IssueType.BEST_PRACTICES, - 'Duplicate branches in \'switch\'': - IssueType.BEST_PRACTICES, - 'Excessive lambda usage': - IssueType.BEST_PRACTICES, - 'Excessive range check': - IssueType.BEST_PRACTICES, - 'Explicit array filling': - IssueType.BEST_PRACTICES, - 'Manual min/max calculation': - IssueType.BEST_PRACTICES, - 'Multiple occurrences of the same expression': - IssueType.BEST_PRACTICES, - 'Redundant \'compare\' method call': - IssueType.BEST_PRACTICES, - 'Redundant \'isInstance\' or \'cast\' call': - IssueType.BEST_PRACTICES, - 'Redundant array creation': - IssueType.BEST_PRACTICES, - 'Redundant Collection operation': - IssueType.BEST_PRACTICES, - 'Redundant String operation': - IssueType.BEST_PRACTICES, - 'Redundant type arguments': - IssueType.BEST_PRACTICES, - 'Redundant type cast': - IssueType.BEST_PRACTICES, - '\'StringBuilder\' can be replaced with \'String\'': - IssueType.BEST_PRACTICES, - 'Too weak variable type leads to unnecessary cast': - IssueType.BEST_PRACTICES, - 'Unnecessary \'break\' statement': - IssueType.BEST_PRACTICES, - 'Unnecessary \'continue\' statement': - IssueType.BEST_PRACTICES, - 'Unnecessary \'default\' for enum \'switch\' statement': - IssueType.BEST_PRACTICES, - 'Unnecessary \'return\' statement': - IssueType.BEST_PRACTICES, - 'Unnecessary label on \'break\' statement': - IssueType.BEST_PRACTICES, - 'Unnecessary label on \'continue\' statement': - IssueType.BEST_PRACTICES, - - # Java | Visibility - 'Access of inherited field looks like access of element in surrounding ' - 'code': - IssueType.BEST_PRACTICES, - 'Anonymous class variable hides variable in containing method': - IssueType.BEST_PRACTICES, - 'Call to inherited method looks like call to local method': - IssueType.BEST_PRACTICES, - 'Field name hides field in superclass': - IssueType.BEST_PRACTICES, - 'Inner class field hides outer class field': - IssueType.BEST_PRACTICES, - 'Lambda parameter hides field': - IssueType.BEST_PRACTICES, - 'Local variable hides field': - IssueType.BEST_PRACTICES, - 'Method overloads method of superclass': - IssueType.BEST_PRACTICES, - 'Method overrides inaccessible method of superclass': - IssueType.BEST_PRACTICES, - 'Method tries to override static method of superclass': - IssueType.BEST_PRACTICES, - 'Module exports/opens package to itself': - IssueType.BEST_PRACTICES, - 'Non-accessible class is exposed': - IssueType.BEST_PRACTICES, - 'Parameter hides field': - IssueType.BEST_PRACTICES, - 'Type parameter hides visible type': - IssueType.BEST_PRACTICES, - 'Usage of service not declared in \'module-info\'': - IssueType.BEST_PRACTICES, -} diff --git a/src/python/review/inspectors/intellij/issue_types/kotlin.py b/src/python/review/inspectors/intellij/issue_types/kotlin.py deleted file mode 100644 index cb692510..00000000 --- a/src/python/review/inspectors/intellij/issue_types/kotlin.py +++ /dev/null @@ -1,382 +0,0 @@ -from typing import Dict - -from src.python.review.inspectors.issue import IssueType - -ISSUE_CLASS_TO_ISSUE_TYPE: Dict[str, IssueType] = { - # Kotlin | Java interop issues - 'Call of Java mutator method on immutable Kotlin collection': - IssueType.ERROR_PRONE, - 'Function or property has platform type': - IssueType.ERROR_PRONE, - 'Kotlin non-const property used as Java constant': - IssueType.ERROR_PRONE, - 'Not-null extension receiver of inline function can be made nullable': - IssueType.ERROR_PRONE, - 'Package name does not match containing directory': - IssueType.ERROR_PRONE, - 'Unsafe call of inline function with nullable extension receiver': - IssueType.ERROR_PRONE, - 'Usage of Kotlin internal declarations from Java': - IssueType.ERROR_PRONE, - - # Kotlin | Naming conventions - 'Class naming convention': - IssueType.CODE_STYLE, - 'Const property naming convention': - IssueType.CODE_STYLE, - 'Enum entry naming convention': - IssueType.CODE_STYLE, - 'Function naming convention': - IssueType.CODE_STYLE, - 'Local variable naming convention': - IssueType.CODE_STYLE, - 'Object property naming convention': - IssueType.CODE_STYLE, - 'Package naming convention': - IssueType.CODE_STYLE, - 'Private property naming convention': - IssueType.CODE_STYLE, - 'Property naming convention': - IssueType.CODE_STYLE, - 'Test function naming convention': - IssueType.CODE_STYLE, - - # Kotlin | Other issues - '@Deprecated annotation without \'replaceWith\' argument': - IssueType.BEST_PRACTICES, - 'Diagnostic name should be replaced': - IssueType.BEST_PRACTICES, - 'Missing KDoc comments for public declarations': - IssueType.BEST_PRACTICES, - 'Overriding deprecated member': - IssueType.BEST_PRACTICES, - 'Public API declaration has implicit return type': - IssueType.BEST_PRACTICES, - 'Replace with EnumMap': - IssueType.BEST_PRACTICES, - - # Kotlin | Probable bugs - 'Ambiguous coroutineContext due to CoroutineScope receiver of suspend ' - 'function': - IssueType.ERROR_PRONE, - 'Ambiguous unary operator use with number constant': - IssueType.ERROR_PRONE, - 'Array property in data class': - IssueType.ERROR_PRONE, - 'Assignment of variable to itself': - IssueType.ERROR_PRONE, - 'Augmented assignment creates a new collection under the hood': - IssueType.ERROR_PRONE, - 'Constructor has non-null self reference parameter': - IssueType.ERROR_PRONE, - 'Convert equality check with \'NaN\' to \'isNaN\' call': - IssueType.ERROR_PRONE, - 'Covariant \'equals()\'': - IssueType.ERROR_PRONE, - 'Deferred result is never used': - IssueType.ERROR_PRONE, - 'Delegating to \'var\' property': - IssueType.ERROR_PRONE, - 'Entry point function should return Unit': - IssueType.ERROR_PRONE, - 'equals() and hashCode() not paired': - IssueType.ERROR_PRONE, - 'Existing backing field is not assigned by the setter': - IssueType.ERROR_PRONE, - 'Extension property conflicting with synthetic one': - IssueType.ERROR_PRONE, - 'Implicit (unsafe) cast from dynamic type': - IssueType.ERROR_PRONE, - 'Implicit `Nothing?` type': - IssueType.ERROR_PRONE, - 'Iterated elements are not used in forEach': - IssueType.ERROR_PRONE, - 'Leaking \'this\' in constructor': - IssueType.ERROR_PRONE, - 'Private data class constructor is exposed via the \'copy\' method': - IssueType.ERROR_PRONE, - 'Range with start greater than endInclusive is empty': - IssueType.ERROR_PRONE, - 'Recursive equals call': - IssueType.ERROR_PRONE, - 'Recursive property accessor': - IssueType.ERROR_PRONE, - 'Replace \'==\' with \'Arrays.equals\'': - IssueType.ERROR_PRONE, - 'Sealed sub-class without state and overridden equals': - IssueType.ERROR_PRONE, - 'Suspicious \'var\' property: its setter does not influence its ' - 'getter result': - IssueType.ERROR_PRONE, - 'Suspicious callable reference used as lambda result': - IssueType.ERROR_PRONE, - 'Suspicious combination of == and ===': - IssueType.ERROR_PRONE, - 'Throwable not thrown': - IssueType.ERROR_PRONE, - 'Unresolved reference in KDoc': - IssueType.ERROR_PRONE, - 'Unused return value of a function with lambda expression body': - IssueType.ERROR_PRONE, - 'Useless call on collection type': - IssueType.ERROR_PRONE, - 'Useless call on not-null type': - IssueType.ERROR_PRONE, - 'Variable in destructuring declaration uses name of a wrong data class ' - 'property': - IssueType.ERROR_PRONE, - - # Kotlin | Redundant constructs - 'Condition of \'if\' expression is constant': - IssueType.BEST_PRACTICES, - 'Constructor parameter is never used as a property': - IssueType.BEST_PRACTICES, - 'Explicitly given type is redundant here': - IssueType.CODE_STYLE, - 'Null-checks replaceable with safe-calls': - IssueType.BEST_PRACTICES, - 'Property is explicitly assigned to constructor parameter': - IssueType.BEST_PRACTICES, - 'Redundant \'if\' statement': - IssueType.BEST_PRACTICES, - 'Redundant \'requireNotNull\' or \'checkNotNull\' call': - IssueType.BEST_PRACTICES, - 'Redundant \'return\' label': - IssueType.BEST_PRACTICES, - 'Redundant \'suspend\' modifier': - IssueType.BEST_PRACTICES, - 'Redundant \'Unit\'': - IssueType.CODE_STYLE, - 'Redundant \'Unit\' return type': - IssueType.CODE_STYLE, - 'Redundant \'with\' call': - IssueType.BEST_PRACTICES, - 'Redundant Companion reference': - IssueType.BEST_PRACTICES, - 'Redundant curly braces in string template': - IssueType.CODE_STYLE, - 'Redundant double negation': - IssueType.BEST_PRACTICES, - 'Redundant enum constructor invocation': - IssueType.BEST_PRACTICES, - 'Redundant explicit \'this\'': - IssueType.BEST_PRACTICES, - 'Redundant lambda arrow': - IssueType.BEST_PRACTICES, - 'Redundant modality modifier': - IssueType.BEST_PRACTICES, - 'Redundant overriding method': - IssueType.BEST_PRACTICES, - 'Redundant property getter': - IssueType.BEST_PRACTICES, - 'Redundant property setter': - IssueType.BEST_PRACTICES, - 'Redundant SAM constructor': - IssueType.BEST_PRACTICES, - 'Redundant semicolon': - IssueType.CODE_STYLE, - 'Redundant setter parameter type': - IssueType.BEST_PRACTICES, - 'Redundant spread operator': - IssueType.BEST_PRACTICES, - 'Redundant visibility modifier': - IssueType.BEST_PRACTICES, - 'Remove empty constructor body': - IssueType.BEST_PRACTICES, - 'Remove empty primary constructor': - IssueType.BEST_PRACTICES, - 'Remove redundant backticks': - IssueType.BEST_PRACTICES, - 'Remove redundant call to \'toString()\' in string template': - IssueType.BEST_PRACTICES, - 'Remove redundant calls of conversion methods': - IssueType.BEST_PRACTICES, - 'Remove redundant qualifier name': - IssueType.BEST_PRACTICES, - 'Remove redundant string template': - IssueType.BEST_PRACTICES, - 'Remove unnecessary parentheses from function call with lambda': - IssueType.BEST_PRACTICES, - 'Replace empty class body': - IssueType.CODE_STYLE, - 'Replace single line .let': - IssueType.BEST_PRACTICES, - 'Simplifiable \'when\'': - IssueType.BEST_PRACTICES, - 'Unnecessary local variable': - IssueType.BEST_PRACTICES, - 'Unnecessary supertype qualification': - IssueType.BEST_PRACTICES, - 'Unnecessary type argument': - IssueType.BEST_PRACTICES, - 'Unused equals expression': - IssueType.BEST_PRACTICES, - 'Unused import directive': - IssueType.BEST_PRACTICES, - 'Unused loop index': - IssueType.BEST_PRACTICES, - 'Unused receiver parameter': - IssueType.BEST_PRACTICES, - 'Unused symbol': - IssueType.BEST_PRACTICES, - '\'when\' has only \'else\' branch and can be simplified': - IssueType.BEST_PRACTICES, - - # Kotlin | Style issues - 'Accessor call that can be replaced with property access syntax': - IssueType.CODE_STYLE, - '\'arrayOf\' call can be replaced with array literal [...]': - IssueType.CODE_STYLE, - '‘assert’ call can be replaced with ‘!!’ or ‘?:\'': - IssueType.CODE_STYLE, - 'Assignment that can be replaced with operator assignment': - IssueType.CODE_STYLE, - 'Boolean expression that can be simplified': - IssueType.CODE_STYLE, - 'Boolean literal argument without parameter name': - IssueType.CODE_STYLE, - 'Call chain on collection could be converted into \'Sequence\' to improve ' - 'performance': - IssueType.CODE_STYLE, - 'Call chain on collection type can be simplified': - IssueType.CODE_STYLE, - 'Can be replaced with binary operator': - IssueType.CODE_STYLE, - 'Can be replaced with function reference': - IssueType.CODE_STYLE, - 'Can be replaced with lambda': - IssueType.CODE_STYLE, - 'Cascade if can be replaced with when': - IssueType.CODE_STYLE, - 'Class member can have \'private\' visibility': - IssueType.BEST_PRACTICES, - 'Collection count can be converted to size': - IssueType.CODE_STYLE, - 'Control flow with empty body': - IssueType.BEST_PRACTICES, - 'Convert Pair constructor to \'to\' function': - IssueType.CODE_STYLE, - 'Convert to primary constructor': - IssueType.CODE_STYLE, - 'Convert try / finally to use() call': - IssueType.CODE_STYLE, - 'Convert two comparisons to \'in\'': - IssueType.CODE_STYLE, - '\'copy\' method of data class is called without named arguments': - IssueType.CODE_STYLE, - 'Equality check can be used instead of elvis for nullable boolean check': - IssueType.CODE_STYLE, - 'Explicit \'get\' or \'set\' call': - IssueType.CODE_STYLE, - 'Expression body syntax is preferable here': - IssueType.CODE_STYLE, - 'File is not formatted according to project settings': - IssueType.CODE_STYLE, - 'Function returning Deferred directly': - IssueType.CODE_STYLE, - 'Function returning Result directly': - IssueType.CODE_STYLE, - 'Function with `= { ... }` and inferred return type': - IssueType.CODE_STYLE, - 'If-Null return/break/... foldable to \'?:\'': - IssueType.CODE_STYLE, - 'If-Then foldable to \'?.\'': - IssueType.CODE_STYLE, - 'If-Then foldable to \'?:\'': - IssueType.CODE_STYLE, - 'Implicit \'this\'': - IssueType.CODE_STYLE, - 'Java Collections static method call can be replaced with Kotlin stdlib': - IssueType.CODE_STYLE, - 'Java Map.forEach method call should be replaced with Kotlin\'s forEach': - IssueType.CODE_STYLE, - 'Join declaration and assignment': - IssueType.CODE_STYLE, - 'Lambda argument inside parentheses': - IssueType.CODE_STYLE, - 'Library function call could be simplified': - IssueType.CODE_STYLE, - 'Local \'var\' is never modified and can be declared as \'val\'': - IssueType.CODE_STYLE, - 'Loop can be replaced with stdlib operations': - IssueType.CODE_STYLE, - 'Main parameter is not necessary': - IssueType.CODE_STYLE, - 'Manually incremented index variable can be replaced with use of ' - '\'withIndex()\'': - IssueType.CODE_STYLE, - 'map.get() with not-null assertion operator (!!)': - IssueType.CODE_STYLE, - 'map.put() can be converted to assignment': - IssueType.CODE_STYLE, - 'Might be \'const\'': - IssueType.CODE_STYLE, - 'Negated boolean expression that can be simplified': - IssueType.CODE_STYLE, - 'Nested lambda has shadowed implicit parameter': - IssueType.CODE_STYLE, - 'Non-canonical modifier order': - IssueType.CODE_STYLE, - 'Object literal can be converted to lambda': - IssueType.CODE_STYLE, - 'Optionally expected annotation has no actual annotation': - IssueType.CODE_STYLE, - '\'protected\' visibility is effectively \'private\' in a final class': - IssueType.CODE_STYLE, - '\'rangeTo\' or the \'..\' call can be replaced with \'until\'': - IssueType.CODE_STYLE, - 'Redundant \'async\' call': - IssueType.CODE_STYLE, - 'Redundant \'else\' in \'if\'': - IssueType.CODE_STYLE, - 'Redundant \'runCatching\' call': - IssueType.CODE_STYLE, - 'Redundant type checks for object': - IssueType.CODE_STYLE, - 'Remove unnecessary parentheses': - IssueType.CODE_STYLE, - 'Replace \'!!\' with \'?:return \'': - IssueType.CODE_STYLE, - 'Replace \'associate\' with \'associateBy\' or \'associateWith\'': - IssueType.CODE_STYLE, - 'Replace \'toString\' with string template': - IssueType.CODE_STYLE, - 'Replace assert boolean with assert equality': - IssueType.CODE_STYLE, - 'Replace Java static method with Kotlin analog': - IssueType.CODE_STYLE, - 'Replace negated \'isEmpty\' with \'isNotEmpty\'': - IssueType.CODE_STYLE, - 'Replace Range \'start\' or \'endInclusive\' with \'first\' or \'last\'': - IssueType.CODE_STYLE, - 'Replace size check with \'isNotEmpty()\'': - IssueType.CODE_STYLE, - 'Replace size zero check with \'isEmpty()\'': - IssueType.CODE_STYLE, - 'Replace with string templates': - IssueType.CODE_STYLE, - 'Replace ’to’ with infix form': - IssueType.CODE_STYLE, - 'Return or assignment can be lifted out': - IssueType.CODE_STYLE, - 'Safe cast with \'return\' should be replaced with \'if\' type check': - IssueType.CODE_STYLE, - 'Scope function can be converted to another one': - IssueType.CODE_STYLE, - 'String concatenation that can be converted to string template': - IssueType.CODE_STYLE, - 'Suspicious \'asDynamic\' member invocation': - IssueType.CODE_STYLE, - 'Type parameter can have \'in\' or \'out\' variance': - IssueType.CODE_STYLE, - 'Unlabeled return inside lambda': - IssueType.CODE_STYLE, - 'Use destructuring declaration': - IssueType.CODE_STYLE, - 'Variable declaration could be moved inside `when`': - IssueType.CODE_STYLE, - '\'when\' that can be simplified by introducing an argument': - IssueType.CODE_STYLE, - - 'Annotator': IssueType.ERROR_PRONE, -} diff --git a/src/python/review/inspectors/intellij/issue_types/python.py b/src/python/review/inspectors/intellij/issue_types/python.py deleted file mode 100644 index 792a7551..00000000 --- a/src/python/review/inspectors/intellij/issue_types/python.py +++ /dev/null @@ -1,253 +0,0 @@ -from typing import Dict - -from src.python.review.inspectors.issue import IssueType - -ISSUE_CLASS_TO_ISSUE_TYPE: Dict[str, IssueType] = { - 'Access to a protected member of a class or a module': - IssueType.BEST_PRACTICES, - - 'Access to properties': - IssueType.ERROR_PRONE, - - 'Argument passed to function is equal to default parameter value': - IssueType.BEST_PRACTICES, - - 'Assigning function call that doesn\'t return anything': - IssueType.BEST_PRACTICES, - - 'Assignment can be replaced with augmented assignment': - IssueType.BEST_PRACTICES, - - 'Assignment to \'for\' loop or \'with\' statement parameter': - IssueType.BEST_PRACTICES, - - 'Bad except clauses order': - IssueType.ERROR_PRONE, - - 'Boolean variable check can be simplified': - IssueType.BEST_PRACTICES, - - 'Byte literal contains characters > 255': - IssueType.ERROR_PRONE, - - 'Calling a method by class using an instance of a different class': - IssueType.BEST_PRACTICES, - - 'Chained comparisons can be simplified': - IssueType.BEST_PRACTICES, - - 'Checks that functions decorated by pytest parametrize have correct arguments': - IssueType.ERROR_PRONE, - - 'Class has no __init__ method': - IssueType.BEST_PRACTICES, - - 'Class must implement all abstract methods': - IssueType.ERROR_PRONE, - - 'Class specific decorator on method outside class': - IssueType.BEST_PRACTICES, - - 'Classic style class usage': - IssueType.BEST_PRACTICES, - - 'Code compatibility inspection': - IssueType.ERROR_PRONE, - - 'Command-line inspection': - IssueType.ERROR_PRONE, - - 'Comparison with None performed with equality operators': - IssueType.BEST_PRACTICES, - - 'Coroutine is not awaited': - IssueType.ERROR_PRONE, - - 'Cython variable usage before declaration': - IssueType.ERROR_PRONE, - - 'Dataclass definition and usages': - IssueType.ERROR_PRONE, - - 'Default argument is mutable': - IssueType.ERROR_PRONE, - - 'Definition of __slots__ in a class': - IssueType.ERROR_PRONE, - - 'Deprecated function, class or module': - IssueType.ERROR_PRONE, - - 'Dictionary contains duplicate keys': - IssueType.ERROR_PRONE, - - 'Dictionary creation could be rewritten by dictionary literal': - IssueType.BEST_PRACTICES, - - 'Errors in string formatting operations': - IssueType.ERROR_PRONE, - - 'Exception doesn\'t inherit from standard \'\'Exception\'\' class': - IssueType.ERROR_PRONE, - - 'File contains non-ASCII character': - IssueType.ERROR_PRONE, - - 'Final classes, methods and variables': - IssueType.ERROR_PRONE, - - 'from __future__ import must be the first executable statement': - IssueType.ERROR_PRONE, - - 'Function call can be replaced with set literal': - IssueType.BEST_PRACTICES, - - 'Global variable is undefined at the module level': - IssueType.ERROR_PRONE, - - 'Incompatible signatures of __new__ and __init__': - IssueType.ERROR_PRONE, - - 'Inconsistent indentation': - IssueType.ERROR_PRONE, - - 'Incorrect call arguments': - IssueType.ERROR_PRONE, - - 'Incorrect docstring': - IssueType.BEST_PRACTICES, - - '__init__ method that returns a value': - IssueType.ERROR_PRONE, - - 'Instance attribute defined outside __init__': - IssueType.BEST_PRACTICES, - 'Invalid interpreter configured': - IssueType.ERROR_PRONE, - - 'List creation could be rewritten by list literal': - IssueType.BEST_PRACTICES, - - 'Method may be static': - IssueType.BEST_PRACTICES, - - 'Method signature does not match signature of overridden method': - IssueType.ERROR_PRONE, - - 'Methods having troubles with first parameter': - IssueType.ERROR_PRONE, - - 'Missed call to __init__ of super class': - IssueType.ERROR_PRONE, - - 'Missing or empty docstring': - IssueType.BEST_PRACTICES, - - 'Missing type hinting for function definition': - IssueType.BEST_PRACTICES, - - 'Namedtuple definition': - IssueType.ERROR_PRONE, - - 'No encoding specified for file': - IssueType.BEST_PRACTICES, - - 'Old-style class contains new-style class features': - IssueType.ERROR_PRONE, - - 'Overloads in regular Python files': - IssueType.ERROR_PRONE, - - 'Package requirements': - IssueType.ERROR_PRONE, - - 'PEP 8 coding style violation': - IssueType.CODE_STYLE, - - 'PEP 8 naming convention violation': - IssueType.CODE_STYLE, - - 'Problematic nesting of decorators': - IssueType.BEST_PRACTICES, - - 'Property definitions': - IssueType.ERROR_PRONE, - - 'Protocol definition and usages': - IssueType.ERROR_PRONE, - - 'Raising a string exception': - IssueType.ERROR_PRONE, - - 'Reassignment of method\'s first argument': - IssueType.ERROR_PRONE, - - 'Redeclared names without usage': - IssueType.ERROR_PRONE, - - 'Redundant parentheses': - IssueType.CODE_STYLE, - - 'Shadowing built-ins': - IssueType.ERROR_PRONE, - - 'Shadowing names from outer scopes': - IssueType.BEST_PRACTICES, - - 'Single quoted docstring': - IssueType.BEST_PRACTICES, - - 'Statement has no effect': - IssueType.ERROR_PRONE, - - 'Stub packages advertiser': - IssueType.BEST_PRACTICES, - - 'Stub packages compatibility inspection': - IssueType.ERROR_PRONE, - - 'Too broad exception clauses': - IssueType.BEST_PRACTICES, - - 'Trailing semicolon in statement': - IssueType.CODE_STYLE, - - 'Trying to call a non-callable object': - IssueType.ERROR_PRONE, - - 'Tuple assignment balance is incorrect': - IssueType.ERROR_PRONE, - - 'Tuple item assignment': - IssueType.ERROR_PRONE, - - 'Type checker': - IssueType.ERROR_PRONE, - - 'Type hints definitions and usages': - IssueType.ERROR_PRONE, - - 'Type in docstring doesn\'t match inferred type': - IssueType.BEST_PRACTICES, - - 'TypedDict definition and usages': - IssueType.ERROR_PRONE, - - 'Unbound local variable': - IssueType.ERROR_PRONE, - - 'Unnecessary backslash': - IssueType.BEST_PRACTICES, - - 'Unreachable code': - IssueType.ERROR_PRONE, - - 'Unresolved references': - IssueType.ERROR_PRONE, - - 'Unused local': - IssueType.BEST_PRACTICES, - - 'Wrong arguments to call super': - IssueType.ERROR_PRONE, -} diff --git a/src/python/review/inspectors/intellij/jdk.table.xml b/src/python/review/inspectors/intellij/jdk.table.xml deleted file mode 100644 index 8b9ec0d7..00000000 --- a/src/python/review/inspectors/intellij/jdk.table.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/python/review/inspectors/intellij/project/.idea/inspectionProfiles/custom_profiles.xml b/src/python/review/inspectors/intellij/project/.idea/inspectionProfiles/custom_profiles.xml deleted file mode 100644 index 7a95bdb1..00000000 --- a/src/python/review/inspectors/intellij/project/.idea/inspectionProfiles/custom_profiles.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - diff --git a/src/python/review/inspectors/intellij/project/.idea/inspectionProfiles/profiles_settings.xml b/src/python/review/inspectors/intellij/project/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 11beaba0..00000000 --- a/src/python/review/inspectors/intellij/project/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/src/python/review/inspectors/intellij/project/.idea/kotlinc.xml b/src/python/review/inspectors/intellij/project/.idea/kotlinc.xml deleted file mode 100644 index 39c35f32..00000000 --- a/src/python/review/inspectors/intellij/project/.idea/kotlinc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/src/python/review/inspectors/intellij/project/.idea/libraries/KotlinJavaRuntime.xml b/src/python/review/inspectors/intellij/project/.idea/libraries/KotlinJavaRuntime.xml deleted file mode 100644 index b7ef79a5..00000000 --- a/src/python/review/inspectors/intellij/project/.idea/libraries/KotlinJavaRuntime.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/python/review/inspectors/intellij/project/.idea/modules.xml b/src/python/review/inspectors/intellij/project/.idea/modules.xml deleted file mode 100644 index efa66b3b..00000000 --- a/src/python/review/inspectors/intellij/project/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/python/review/inspectors/intellij/project/java_sources/java_sources.iml b/src/python/review/inspectors/intellij/project/java_sources/java_sources.iml deleted file mode 100644 index 0fe5243b..00000000 --- a/src/python/review/inspectors/intellij/project/java_sources/java_sources.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/python/review/inspectors/intellij/project/kotlin_sources/kotlin_sources.iml b/src/python/review/inspectors/intellij/project/kotlin_sources/kotlin_sources.iml deleted file mode 100644 index 25474137..00000000 --- a/src/python/review/inspectors/intellij/project/kotlin_sources/kotlin_sources.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/python/review/inspectors/intellij/project/python_sources/python_sources.iml b/src/python/review/inspectors/intellij/project/python_sources/python_sources.iml deleted file mode 100644 index dfe7286d..00000000 --- a/src/python/review/inspectors/intellij/project/python_sources/python_sources.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/python/review/inspectors/spotbugs/__init__.py b/src/python/review/inspectors/spotbugs/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-ASM.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-ASM.txt deleted file mode 100644 index 75ad085e..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-ASM.txt +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-AppleJavaExtensions.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-AppleJavaExtensions.txt deleted file mode 100644 index db723b46..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-AppleJavaExtensions.txt +++ /dev/null @@ -1,46 +0,0 @@ -AppleJavaExtensions -v 1.2 - -This is a pluggable jar of stub classes representing the new Apple eAWT and eIO APIs for Java 1.4 on Mac OS X. The purpose of these stubs is to allow for compilation of eAWT- or eIO-referencing code on platforms other than Mac OS X. The jar file is enclosed in a zip archive for easy expansion on other platforms. - -These stubs are not intended for the runtime classpath on non-Mac platforms. Please see the OSXAdapter sample for how to write cross-platform code that uses eAWT. - -Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple -Computer, Inc. ("Apple") in consideration of your agreement to the -following terms, and your use, installation, modification or -redistribution of this Apple software constitutes acceptance of these -terms. If you do not agree with these terms, please do not use, -install, modify or redistribute this Apple software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, Apple grants you a personal, non-exclusive -license, under Apple's copyrights in this original Apple software (the -"Apple Software"), to use, reproduce, modify and redistribute the Apple -Software, with or without modifications, in source and/or binary forms; -provided that if you redistribute the Apple Software in its entirety and -without modifications, you must retain this notice and the following -text and disclaimers in all such redistributions of the Apple Software. -Neither the name, trademarks, service marks or logos of Apple Computer, -Inc. may be used to endorse or promote products derived from the Apple -Software without specific prior written permission from Apple. Except -as expressly stated in this notice, no other rights or licenses, express -or implied, are granted by Apple herein, including but not limited to -any patent rights that may be infringed by your derivative works or by -other works in which the Apple Software may be incorporated. - -The Apple Software is provided by Apple on an "AS IS" basis. APPLE -MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION -THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND -OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - -IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, -MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED -AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), -STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -Copyright © 2003-2006 Apple Computer, Inc., All Rights Reserved \ No newline at end of file diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-Saxon-HE.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-Saxon-HE.txt deleted file mode 100644 index f4bbcd20..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-Saxon-HE.txt +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-bcel.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-bcel.txt deleted file mode 100644 index 1c572e31..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-bcel.txt +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Apache License - * Version 2.0, January 2004 - * http://www.apache.org/licenses/ - * - * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - * - * 1. Definitions. - * - * "License" shall mean the terms and conditions for use, reproduction, - * and distribution as defined by Sections 1 through 9 of this document. - * - * "Licensor" shall mean the copyright owner or entity authorized by - * the copyright owner that is granting the License. - * - * "Legal Entity" shall mean the union of the acting entity and all - * other entities that control, are controlled by, or are under common - * control with that entity. For the purposes of this definition, - * "control" means (i) the power, direct or indirect, to cause the - * direction or management of such entity, whether by contract or - * otherwise, or (ii) ownership of fifty percent (50%) or more of the - * outstanding shares, or (iii) beneficial ownership of such entity. - * - * "You" (or "Your") shall mean an individual or Legal Entity - * exercising permissions granted by this License. - * - * "Source" form shall mean the preferred form for making modifications, - * including but not limited to software source code, documentation - * source, and configuration files. - * - * "Object" form shall mean any form resulting from mechanical - * transformation or translation of a Source form, including but - * not limited to compiled object code, generated documentation, - * and conversions to other media types. - * - * "Work" shall mean the work of authorship, whether in Source or - * Object form, made available under the License, as indicated by a - * copyright notice that is included in or attached to the work - * (an example is provided in the Appendix below). - * - * "Derivative Works" shall mean any work, whether in Source or Object - * form, that is based on (or derived from) the Work and for which the - * editorial revisions, annotations, elaborations, or other modifications - * represent, as a whole, an original work of authorship. For the purposes - * of this License, Derivative Works shall not include works that remain - * separable from, or merely link (or bind by name) to the interfaces of, - * the Work and Derivative Works thereof. - * - * "Contribution" shall mean any work of authorship, including - * the original version of the Work and any modifications or additions - * to that Work or Derivative Works thereof, that is intentionally - * submitted to Licensor for inclusion in the Work by the copyright owner - * or by an individual or Legal Entity authorized to submit on behalf of - * the copyright owner. For the purposes of this definition, "submitted" - * means any form of electronic, verbal, or written communication sent - * to the Licensor or its representatives, including but not limited to - * communication on electronic mailing lists, source code control systems, - * and issue tracking systems that are managed by, or on behalf of, the - * Licensor for the purpose of discussing and improving the Work, but - * excluding communication that is conspicuously marked or otherwise - * designated in writing by the copyright owner as "Not a Contribution." - * - * "Contributor" shall mean Licensor and any individual or Legal Entity - * on behalf of whom a Contribution has been received by Licensor and - * subsequently incorporated within the Work. - * - * 2. Grant of Copyright License. Subject to the terms and conditions of - * this License, each Contributor hereby grants to You a perpetual, - * worldwide, non-exclusive, no-charge, royalty-free, irrevocable - * copyright license to reproduce, prepare Derivative Works of, - * publicly display, publicly perform, sublicense, and distribute the - * Work and such Derivative Works in Source or Object form. - * - * 3. Grant of Patent License. Subject to the terms and conditions of - * this License, each Contributor hereby grants to You a perpetual, - * worldwide, non-exclusive, no-charge, royalty-free, irrevocable - * (except as stated in this section) patent license to make, have made, - * use, offer to sell, sell, import, and otherwise transfer the Work, - * where such license applies only to those patent claims licensable - * by such Contributor that are necessarily infringed by their - * Contribution(s) alone or by combination of their Contribution(s) - * with the Work to which such Contribution(s) was submitted. If You - * institute patent litigation against any entity (including a - * cross-claim or counterclaim in a lawsuit) alleging that the Work - * or a Contribution incorporated within the Work constitutes direct - * or contributory patent infringement, then any patent licenses - * granted to You under this License for that Work shall terminate - * as of the date such litigation is filed. - * - * 4. Redistribution. You may reproduce and distribute copies of the - * Work or Derivative Works thereof in any medium, with or without - * modifications, and in Source or Object form, provided that You - * meet the following conditions: - * - * (a) You must give any other recipients of the Work or - * Derivative Works a copy of this License; and - * - * (b) You must cause any modified files to carry prominent notices - * stating that You changed the files; and - * - * (c) You must retain, in the Source form of any Derivative Works - * that You distribute, all copyright, patent, trademark, and - * attribution notices from the Source form of the Work, - * excluding those notices that do not pertain to any part of - * the Derivative Works; and - * - * (d) If the Work includes a "NOTICE" text file as part of its - * distribution, then any Derivative Works that You distribute must - * include a readable copy of the attribution notices contained - * within such NOTICE file, excluding those notices that do not - * pertain to any part of the Derivative Works, in at least one - * of the following places: within a NOTICE text file distributed - * as part of the Derivative Works; within the Source form or - * documentation, if provided along with the Derivative Works; or, - * within a display generated by the Derivative Works, if and - * wherever such third-party notices normally appear. The contents - * of the NOTICE file are for informational purposes only and - * do not modify the License. You may add Your own attribution - * notices within Derivative Works that You distribute, alongside - * or as an addendum to the NOTICE text from the Work, provided - * that such additional attribution notices cannot be construed - * as modifying the License. - * - * You may add Your own copyright statement to Your modifications and - * may provide additional or different license terms and conditions - * for use, reproduction, or distribution of Your modifications, or - * for any such Derivative Works as a whole, provided Your use, - * reproduction, and distribution of the Work otherwise complies with - * the conditions stated in this License. - * - * 5. Submission of Contributions. Unless You explicitly state otherwise, - * any Contribution intentionally submitted for inclusion in the Work - * by You to the Licensor shall be under the terms and conditions of - * this License, without any additional terms or conditions. - * Notwithstanding the above, nothing herein shall supersede or modify - * the terms of any separate license agreement you may have executed - * with Licensor regarding such Contributions. - * - * 6. Trademarks. This License does not grant permission to use the trade - * names, trademarks, service marks, or product names of the Licensor, - * except as required for reasonable and customary use in describing the - * origin of the Work and reproducing the content of the NOTICE file. - * - * 7. Disclaimer of Warranty. Unless required by applicable law or - * agreed to in writing, Licensor provides the Work (and each - * Contributor provides its Contributions) on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied, including, without limitation, any warranties or conditions - * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - * PARTICULAR PURPOSE. You are solely responsible for determining the - * appropriateness of using or redistributing the Work and assume any - * risks associated with Your exercise of permissions under this License. - * - * 8. Limitation of Liability. In no event and under no legal theory, - * whether in tort (including negligence), contract, or otherwise, - * unless required by applicable law (such as deliberate and grossly - * negligent acts) or agreed to in writing, shall any Contributor be - * liable to You for damages, including any direct, indirect, special, - * incidental, or consequential damages of any character arising as a - * result of this License or out of the use or inability to use the - * Work (including but not limited to damages for loss of goodwill, - * work stoppage, computer failure or malfunction, or any and all - * other commercial damages or losses), even if such Contributor - * has been advised of the possibility of such damages. - * - * 9. Accepting Warranty or Additional Liability. While redistributing - * the Work or Derivative Works thereof, You may choose to offer, - * and charge a fee for, acceptance of support, warranty, indemnity, - * or other liability obligations and/or rights consistent with this - * License. However, in accepting such obligations, You may act only - * on Your own behalf and on Your sole responsibility, not on behalf - * of any other Contributor, and only if You agree to indemnify, - * defend, and hold each Contributor harmless for any liability - * incurred by, or claims asserted against, such Contributor by reason - * of your accepting any such warranty or additional liability. - * - * END OF TERMS AND CONDITIONS - * - * APPENDIX: How to apply the Apache License to your work. - * - * To apply the Apache License to your work, attach the following - * boilerplate notice, with the fields enclosed by brackets "[]" - * replaced with your own identifying information. (Don't include - * the brackets!) The text should be enclosed in the appropriate - * comment syntax for the file format. We also recommend that a - * file or class name and description of purpose be included on the - * same "printed page" as the copyright notice for easier - * identification within third-party archives. - * - * Copyright [yyyy] [name of copyright owner] - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-commons-lang.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-commons-lang.txt deleted file mode 100644 index d6456956..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-commons-lang.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-docbook.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-docbook.txt deleted file mode 100644 index 6ba2ed1b..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-docbook.txt +++ /dev/null @@ -1,25 +0,0 @@ - diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-dom4j.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-dom4j.txt deleted file mode 100644 index 720c83b7..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-dom4j.txt +++ /dev/null @@ -1,41 +0,0 @@ -BSD style license - -Redistribution and use of this software and associated documentation -("Software"), with or without modification, are permitted provided that -the following conditions are met: - - 1. Redistributions of source code must retain copyright statements - and notices. Redistributions must also contain a copy of this - document. - - 2. Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - 3. The name "DOM4J" must not be used to endorse or promote - products derived from this Software without prior written - permission of MetaStuff, Ltd. For written permission, please - contact dom4j-info@metastuff.com. - - 4. Products derived from this Software may not be called "DOM4J" - nor may "DOM4J" appear in their names without prior written - permission of MetaStuff, Ltd. DOM4J is a registered trademark of - MetaStuff, Ltd. - - 5. Due credit should be given to the DOM4J Project - (http://dom4j.org/). - -THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-jaxen.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-jaxen.txt deleted file mode 100644 index ba31ed98..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-jaxen.txt +++ /dev/null @@ -1,33 +0,0 @@ -/* - $Id: LICENSE-jaxen.txt,v 1.1 2008/06/18 18:54:23 wpugh Exp $ - - Copyright 2003-2006 The Werken Company. All Rights Reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - * Neither the name of the Jaxen Project nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - */ diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-jcip.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-jcip.txt deleted file mode 100644 index ca697589..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-jcip.txt +++ /dev/null @@ -1,5 +0,0 @@ -The Java code in the package net.jcip.annotations -is copyright (c) 2005 Brian Goetz -and is released under the Creative Commons Attribution License -(http://creativecommons.org/licenses/by/2.5) -Official home: http://www.jcip.net diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-jsr305.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-jsr305.txt deleted file mode 100644 index 29fae787..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-jsr305.txt +++ /dev/null @@ -1,8 +0,0 @@ -The JSR-305 reference implementation (lib/jsr305.jar) is -distributed under the terms of the New BSD license: - - http://www.opensource.org/licenses/bsd-license.php - -See the JSR-305 home page for more information: - - http://code.google.com/p/jsr-305/ diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-logback.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-logback.txt deleted file mode 100644 index af39fcb9..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-logback.txt +++ /dev/null @@ -1,15 +0,0 @@ -Logback LICENSE ---------------- - -Logback: the reliable, generic, fast and flexible logging framework. -Copyright (C) 1999-2015, QOS.ch. All rights reserved. - -This program and the accompanying materials are dual-licensed under -either the terms of the Eclipse Public License v1.0 as published by -the Eclipse Foundation - - or (per the licensee's choosing) - -under the terms of the GNU Lesser General Public License version 2.1 -as published by the Free Software Foundation. - diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE-slf4j.txt b/src/python/review/inspectors/spotbugs/files/LICENSE-slf4j.txt deleted file mode 100644 index 315bd497..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE-slf4j.txt +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2004-2017 QOS.ch -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - diff --git a/src/python/review/inspectors/spotbugs/files/LICENSE.txt b/src/python/review/inspectors/spotbugs/files/LICENSE.txt deleted file mode 100644 index b1e3f5a2..00000000 --- a/src/python/review/inspectors/spotbugs/files/LICENSE.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/src/python/review/inspectors/spotbugs/files/README.txt b/src/python/review/inspectors/spotbugs/files/README.txt deleted file mode 100644 index 4ddbe736..00000000 --- a/src/python/review/inspectors/spotbugs/files/README.txt +++ /dev/null @@ -1,20 +0,0 @@ -To get started, see doc/index.html and doc/manual/index.html - -The FindBugs source license is in the file LICENSE.txt - -Both the name FindBugs and the FindBugs bug mark are -trademarked by the University of Maryland. - -The Apache BCEL license is in the file LICENSE-bcel.txt - -The ASM license is in the file LICENSE-ASM.txt - -The dom4j license is in the file LICENSE-dom4j.txt - -The AppleJavaExtensions license is in the file LICENSE-AppleJavaExtensions.txt - -The Docbook 4.2 XML DTD license is in the file LICENSE-docbook.txt - -The JSR-305 reference implementation license is in LICENSE-jsr305.txt - -The Jaxen license is in LICENSE-jaxen.txt diff --git a/src/python/review/inspectors/spotbugs/files/bin/addMessages b/src/python/review/inspectors/spotbugs/files/bin/addMessages deleted file mode 100644 index 8861c6db..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/addMessages +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.AddMessages "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/computeBugHistory b/src/python/review/inspectors/spotbugs/files/bin/computeBugHistory deleted file mode 100644 index 1eadf4f5..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/computeBugHistory +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/sh - -# Merge a historical bug collection and a bug collection, producing an updated -# historical bug collection - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.Update "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/convertXmlToText b/src/python/review/inspectors/spotbugs/files/bin/convertXmlToText deleted file mode 100644 index a0f0d736..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/convertXmlToText +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.PrintingBugReporter "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/copyBuggySource b/src/python/review/inspectors/spotbugs/files/bin/copyBuggySource deleted file mode 100644 index 6651b05c..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/copyBuggySource +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.CopyBuggySource "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/defectDensity b/src/python/review/inspectors/spotbugs/files/bin/defectDensity deleted file mode 100644 index 06c835ab..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/defectDensity +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh - -# Generate a defect density table from a bug collection - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.DefectDensity "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/deprecated/bugHistory b/src/python/review/inspectors/spotbugs/files/bin/deprecated/bugHistory deleted file mode 100644 index 679c4b0b..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/deprecated/bugHistory +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh - -# Deprecated - -exec "$(dirname $0)/../fbwrap" edu.umd.cs.findbugs.workflow.BugHistory "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/deprecated/unionBugs b/src/python/review/inspectors/spotbugs/files/bin/deprecated/unionBugs deleted file mode 100644 index bdce784d..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/deprecated/unionBugs +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh - -# Deprecated - -exec "$(dirname $0)/../unionBugs" "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/deprecated/unionResults b/src/python/review/inspectors/spotbugs/files/bin/deprecated/unionResults deleted file mode 100644 index 14d227bd..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/deprecated/unionResults +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh - -# Deprecated (replaced by unionBugs) - -exec "$(dirname $0)/../unionBugs" "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/deprecated/updateBugs b/src/python/review/inspectors/spotbugs/files/bin/deprecated/updateBugs deleted file mode 100644 index 365c5fea..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/deprecated/updateBugs +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh - -# Deprecated (replaced by computeBugHistory) - -exec "$(dirname $0)/../computeBugHistory" "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/experimental/backdateHistoryUsingSource b/src/python/review/inspectors/spotbugs/files/bin/experimental/backdateHistoryUsingSource deleted file mode 100644 index 04f55ee6..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/experimental/backdateHistoryUsingSource +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/../fbwrap" edu.umd.cs.findbugs.workflow.BackdateHistoryUsingSource "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/experimental/churn b/src/python/review/inspectors/spotbugs/files/bin/experimental/churn deleted file mode 100644 index 4372b5bf..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/experimental/churn +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/../fbwrap" edu.umd.cs.findbugs.workflow.Churn "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/experimental/obfuscate b/src/python/review/inspectors/spotbugs/files/bin/experimental/obfuscate deleted file mode 100644 index 6e6bedde..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/experimental/obfuscate +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/../fbwrap" edu.umd.cs.findbugs.workflow.ObfuscateBugs "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/experimental/treemapVisualization b/src/python/review/inspectors/spotbugs/files/bin/experimental/treemapVisualization deleted file mode 100644 index 6261e930..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/experimental/treemapVisualization +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/../fbwrap" edu.umd.cs.findbugs.workflow.TreemapVisualization "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/fb b/src/python/review/inspectors/spotbugs/files/bin/fb deleted file mode 100644 index 8e0034cd..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/fb +++ /dev/null @@ -1,207 +0,0 @@ -#! /bin/sh - -# Launch FindBugs from the command line. - -escape_arg() { - echo "$1" | sed -e "s,\\([\\\"' ]\\),\\\\\\1,g" -} - -program="$0" - -# Follow symlinks until we get to the actual file. -while [ -h "$program" ]; do - link=`ls -ld "$program"` - link=`expr "$link" : '.*-> \(.*\)'` - if [ "`expr "$link" : '/.*'`" = 0 ]; then - # Relative - dir=`dirname "$program"` - program="$dir/$link" - else - # Absolute - program="$link" - fi -done - -# Assume SpotBugs home directory is the parent -# of the directory containing the script (which should -# normally be "$spotbugs_home/bin"). -dir=`dirname "$program"` -spotbugs_home="$dir/.." - -# Handle FHS-compliant installations (e.g., Fink) -if [ -d "$spotbugs_home/share/spotbugs" ]; then - spotbugs_home="$spotbugs_home/share/spotbugs" -fi - -# Make absolute -spotbugs_home=`cd "$spotbugs_home" && pwd` - -fb_pathsep=':' - -# Handle cygwin, courtesy of Peter D. Stout -fb_osname=`uname` -if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then - spotbugs_home=`cygpath --mixed "$spotbugs_home"` - fb_pathsep=';' -fi -# Handle MKS, courtesy of Kelly O'Hair -if [ "${fb_osname}" = "Windows_NT" ]; then - fb_pathsep=';' -fi - -if [ ! -d "$spotbugs_home" ]; then - echo "The path $spotbugs_home," - echo "which is where I think SpotBugs is located," - echo "does not seem to be a directory." - exit 1 -fi - -# Choose default java binary -fb_javacmd=java -if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then - if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then - fb_javacmd=`cygpath --mixed "$JAVA_HOME"`/bin/java - else - fb_javacmd="$JAVA_HOME/bin/java" - fi -fi - - -fb_appjar="$spotbugs_home/lib/spotbugs.jar" - -ShowHelpAndExit() { - fb_mainclass="edu.umd.cs.findbugs.ShowHelp" - fb_javacmd=${fb_javacmd:-"java"} -fb_maxheap=${fb_maxheap:-"-Xmx768m"} -fb_appjar=${fb_appjar:-"$spotbugs_home/lib/spotbugs.jar"} -if [ -n "$CLASSPATH" ]; then - fb_classpath=$fb_appjar$fb_pathsep$CLASSPATH -else - fb_classpath=$fb_appjar -fi -set -f -#echo command: \ -exec "$fb_javacmd" \ - -classpath "$fb_classpath" \ - -Dspotbugs.home="$spotbugs_home"\ - $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs - exit 0 -} - -# Set defaults -fb_mainclass="edu.umd.cs.findbugs.workflow.FB" -user_jvmargs='' -ea_arg='' -debug_arg='' -conservespace_arg='' -workhard_arg='' -user_props='' - -# Handle command line arguments. -while [ $# -gt 0 ]; do - case $1 in - -textui) - fb_mainclass="edu.umd.cs.findbugs.FindBugs2" - ;; - - -jvmArgs) - shift - user_jvmargs="$1" - ;; - - -ea) - ea_arg='-ea' - ;; - - -maxHeap) - shift - fb_maxheap="-Xmx$1m" - ;; - - -javahome) - shift - fb_javacmd="$1/bin/java" - ;; - - -debug) - debug_arg="-Dfindbugs.debug=true" - ;; - - -conserveSpace) - conservespace_arg="-Dfindbugs.conserveSpace=true" - ;; - - -property) - shift - user_props="-D$1 $user_props" - ;; - - -D*=*) - user_props="$1 $user_props" - ;; - - -version) - fb_mainclass=edu.umd.cs.findbugs.Version - fb_appargs="-release" - while [ $# -gt 0 ]; do - shift - done - fb_javacmd=${fb_javacmd:-"java"} -fb_maxheap=${fb_maxheap:-"-Xmx768m"} -fb_appjar=${fb_appjar:-"$spotbugs_home/lib/spotbugs.jar"} -if [ -n "$CLASSPATH" ]; then - fb_classpath=$fb_appjar$fb_pathsep$CLASSPATH -else - fb_classpath=$fb_appjar -fi -set -f -#echo command: \ -exec "$fb_javacmd" \ - -classpath "$fb_classpath" \ - -Dspotbugs.home="$spotbugs_home"\ - $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs - exit 0 - ;; - - -help) - ShowHelpAndExit - ;; - - # All unrecognized arguments will be accumulated and - # passed to the application. - *) - fb_appargs="$fb_appargs `escape_arg "$1"`" - ;; - esac - - shift -done - -fb_jvmargs="$user_jvmargs $debug_arg $conservespace_arg $workhard_arg $user_props $ea_arg" -if [ $maxheap ]; then - fb_maxheap="-Xmx${maxheap}m" -fi - -# Extra JVM args for MacOSX. -if [ $fb_osname = "Darwin" ]; then - fb_jvmargs="$fb_jvmargs \ - -Xdock:name=FindBugs -Xdock:icon=${spotbugs_home}/lib/buggy.icns \ - -Dapple.laf.useScreenMenuBar=true" -fi - -fb_javacmd=${fb_javacmd:-"java"} -fb_maxheap=${fb_maxheap:-"-Xmx768m"} -fb_appjar=${fb_appjar:-"$spotbugs_home/lib/spotbugs.jar"} -if [ -n "$CLASSPATH" ]; then - fb_classpath=$fb_appjar$fb_pathsep$CLASSPATH -else - fb_classpath=$fb_appjar -fi -set -f -#echo command: \ -exec "$fb_javacmd" \ - -classpath "$fb_classpath" \ - -Dspotbugs.home="$spotbugs_home"\ - $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs - -# vim:ts=3 diff --git a/src/python/review/inspectors/spotbugs/files/bin/fbwrap b/src/python/review/inspectors/spotbugs/files/bin/fbwrap deleted file mode 100644 index 8fd85619..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/fbwrap +++ /dev/null @@ -1,89 +0,0 @@ -#! /bin/sh - -# A convenient way to call the main() method of a class -# in findbugs.jar. - -program="$0" - -# Follow symlinks until we get to the actual file. -while [ -h "$program" ]; do - link=`ls -ld "$program"` - link=`expr "$link" : '.*-> \(.*\)'` - if [ "`expr "$link" : '/.*'`" = 0 ]; then - # Relative - dir=`dirname "$program"` - program="$dir/$link" - else - # Absolute - program="$link" - fi -done - -# Assume SpotBugs home directory is the parent -# of the directory containing the script (which should -# normally be "$spotbugs_home/bin"). -dir=`dirname "$program"` -spotbugs_home="$dir/.." - -# Handle FHS-compliant installations (e.g., Fink) -if [ -d "$spotbugs_home/share/spotbugs" ]; then - spotbugs_home="$spotbugs_home/share/spotbugs" -fi - -# Make absolute -spotbugs_home=`cd "$spotbugs_home" && pwd` - -fb_pathsep=':' - -# Handle cygwin, courtesy of Peter D. Stout -fb_osname=`uname` -if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then - spotbugs_home=`cygpath --mixed "$spotbugs_home"` - fb_pathsep=';' -fi -# Handle MKS, courtesy of Kelly O'Hair -if [ "${fb_osname}" = "Windows_NT" ]; then - fb_pathsep=';' -fi - -if [ ! -d "$spotbugs_home" ]; then - echo "The path $spotbugs_home," - echo "which is where I think SpotBugs is located," - echo "does not seem to be a directory." - exit 1 -fi - -# Choose default java binary -fb_javacmd=java -if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then - if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then - fb_javacmd=`cygpath --mixed "$JAVA_HOME"`/bin/java - else - fb_javacmd="$JAVA_HOME/bin/java" - fi -fi - -if [ $# -eq 0 ]; then - echo "Usage: fbwrap
" - exit 1 -fi - -fb_mainclass="$1" -shift - -fb_javacmd=${fb_javacmd:-"java"} -fb_maxheap=${fb_maxheap:-"-Xmx768m"} -fb_appjar=${fb_appjar:-"$spotbugs_home/lib/spotbugs.jar"} -if [ -n "$CLASSPATH" ]; then - fb_classpath=$fb_appjar$fb_pathsep$CLASSPATH -else - fb_classpath=$fb_appjar -fi -set -f -#echo command: \ -exec "$fb_javacmd" \ - -classpath "$fb_classpath" \ - -Dspotbugs.home="$spotbugs_home"\ - $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs - -# vim:ts=3 diff --git a/src/python/review/inspectors/spotbugs/files/bin/filterBugs b/src/python/review/inspectors/spotbugs/files/bin/filterBugs deleted file mode 100644 index 69dcd6a4..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/filterBugs +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/sh - -# General purpose utility for filtering/transforming bug collection and/or -# historical bug collections - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.Filter "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/findbugs-msv b/src/python/review/inspectors/spotbugs/files/bin/findbugs-msv deleted file mode 100644 index fa142540..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/findbugs-msv +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.MergeSummarizeAndView "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/listBugDatabaseInfo b/src/python/review/inspectors/spotbugs/files/bin/listBugDatabaseInfo deleted file mode 100644 index 0ebc0866..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/listBugDatabaseInfo +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.ListBugDatabaseInfo "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/mineBugHistory b/src/python/review/inspectors/spotbugs/files/bin/mineBugHistory deleted file mode 100644 index 2aa90b3e..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/mineBugHistory +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.MineBugHistory "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/printAppVersion b/src/python/review/inspectors/spotbugs/files/bin/printAppVersion deleted file mode 100644 index bcc0e976..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/printAppVersion +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.PrintAppVersion "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/printClass b/src/python/review/inspectors/spotbugs/files/bin/printClass deleted file mode 100644 index 7be7d3d0..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/printClass +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.visitclass.PrintClass "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/rejarForAnalysis b/src/python/review/inspectors/spotbugs/files/bin/rejarForAnalysis deleted file mode 100644 index af846d43..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/rejarForAnalysis +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.RejarClassesForAnalysis "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/setBugDatabaseInfo b/src/python/review/inspectors/spotbugs/files/bin/setBugDatabaseInfo deleted file mode 100644 index 0fde311b..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/setBugDatabaseInfo +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.SetBugDatabaseInfo "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/spotbugs b/src/python/review/inspectors/spotbugs/files/bin/spotbugs deleted file mode 100755 index 491225c0..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/spotbugs +++ /dev/null @@ -1,214 +0,0 @@ -#! /bin/sh - -# Launch SpotBugs from the command line. - -escape_arg() { - echo "$1" | sed -e "s,\\([\\\"' ]\\),\\\\\\1,g" -} - -program="$0" - -# Follow symlinks until we get to the actual file. -while [ -h "$program" ]; do - link=`ls -ld "$program"` - link=`expr "$link" : '.*-> \(.*\)'` - if [ "`expr "$link" : '/.*'`" = 0 ]; then - # Relative - dir=`dirname "$program"` - program="$dir/$link" - else - # Absolute - program="$link" - fi -done - -# Assume SpotBugs home directory is the parent -# of the directory containing the script (which should -# normally be "$spotbugs_home/bin"). -dir=`dirname "$program"` -spotbugs_home="$dir/.." - -# Handle FHS-compliant installations (e.g., Fink) -if [ -d "$spotbugs_home/share/spotbugs" ]; then - spotbugs_home="$spotbugs_home/share/spotbugs" -fi - -# Make absolute -spotbugs_home=`cd "$spotbugs_home" && pwd` - -fb_pathsep=':' - -# Handle cygwin, courtesy of Peter D. Stout -fb_osname=`uname` -if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then - spotbugs_home=`cygpath --mixed "$spotbugs_home"` - fb_pathsep=';' -fi -# Handle MKS, courtesy of Kelly O'Hair -if [ "${fb_osname}" = "Windows_NT" ]; then - fb_pathsep=';' -fi - -if [ ! -d "$spotbugs_home" ]; then - echo "The path $spotbugs_home," - echo "which is where I think SpotBugs is located," - echo "does not seem to be a directory." - exit 1 -fi - -# Choose default java binary -fb_javacmd=java -if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then - if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then - fb_javacmd=`cygpath --mixed "$JAVA_HOME"`/bin/java - else - fb_javacmd="$JAVA_HOME/bin/java" - fi -fi - -fb_appjar="$spotbugs_home/lib/spotbugs.jar" - -ShowHelpAndExit() { - fb_mainclass="edu.umd.cs.findbugs.ShowHelp" - fb_javacmd=${fb_javacmd:-"java"} -fb_maxheap=${fb_maxheap:-"-Xmx768m"} -fb_appjar=${fb_appjar:-"$spotbugs_home/lib/spotbugs.jar"} -if [ -n "$CLASSPATH" ]; then - fb_classpath=$fb_appjar$fb_pathsep$CLASSPATH -else - fb_classpath=$fb_appjar -fi -set -f -#echo command: \ -exec "$fb_javacmd" \ - -classpath "$fb_classpath" \ - -Dspotbugs.home="$spotbugs_home"\ - $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs - exit 0 -} - -# Set defaults -fb_mainclass="edu.umd.cs.findbugs.LaunchAppropriateUI" -user_jvmargs='' -ea_arg='' -debug_arg='' -conservespace_arg='' -workhard_arg='' -user_props='' - -# Handle command line arguments. -while [ $# -gt 0 ]; do - case $1 in - -gui) - # this is the default - ;; - - -gui1) - user_props="-Dfindbugs.launchUI=1 $user_props" - ;; - - -textui) - fb_mainclass="edu.umd.cs.findbugs.FindBugs2" - ;; - - -jvmArgs) - shift - user_jvmargs="$1" - ;; - - -ea) - ea_arg='-ea' - ;; - - -maxHeap) - shift - fb_maxheap="-Xmx$1m" - ;; - - -javahome) - shift - fb_javacmd="$1/bin/java" - ;; - - -debug) - debug_arg="-Dfindbugs.debug=true" - ;; - - -conserveSpace) - conservespace_arg="-Dfindbugs.conserveSpace=true" - ;; - - -property) - shift - user_props="-D$1 $user_props" - ;; - - -D*=*) - user_props="$1 $user_props" - ;; - - -version) - fb_mainclass=edu.umd.cs.findbugs.Version - fb_appargs="-release" - while [ $# -gt 0 ]; do - shift - done - fb_javacmd=${fb_javacmd:-"java"} -fb_maxheap=${fb_maxheap:-"-Xmx768m"} -fb_appjar=${fb_appjar:-"$spotbugs_home/lib/spotbugs.jar"} -if [ -n "$CLASSPATH" ]; then - fb_classpath=$fb_appjar$fb_pathsep$CLASSPATH -else - fb_classpath=$fb_appjar -fi -set -f -#echo command: \ -exec "$fb_javacmd" \ - -classpath "$fb_classpath" \ - -Dspotbugs.home="$spotbugs_home"\ - $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs - exit 0 - ;; - - -help) - ShowHelpAndExit - ;; - - # All unrecognized arguments will be accumulated and - # passed to the application. - *) - fb_appargs="$fb_appargs `escape_arg "$1"`" - ;; - esac - - shift -done - -fb_jvmargs="$user_jvmargs $debug_arg $conservespace_arg $workhard_arg $user_props $ea_arg" -if [ $maxheap ]; then - fb_maxheap="-Xmx${maxheap}m" -fi - -# Extra JVM args for MacOSX. -if [ $fb_osname = "Darwin" ]; then - fb_jvmargs="$fb_jvmargs \ - -Xdock:name=FindBugs -Xdock:icon=${spotbugs_home}/lib/buggy.icns \ - -Dapple.laf.useScreenMenuBar=true" -fi - -fb_javacmd=${fb_javacmd:-"java"} -fb_maxheap=${fb_maxheap:-"-Xmx768m"} -fb_appjar=${fb_appjar:-"$spotbugs_home/lib/spotbugs.jar"} -if [ -n "$CLASSPATH" ]; then - fb_classpath=$fb_appjar$fb_pathsep$CLASSPATH -else - fb_classpath=$fb_appjar -fi -set -f -#echo command: \ -exec "$fb_javacmd" \ - -classpath "$fb_classpath" \ - -Dspotbugs.home="$spotbugs_home"\ - $fb_maxheap $fb_jvmargs $fb_mainclass ${@:+"$@"} $fb_appargs - -# vim:ts=3 diff --git a/src/python/review/inspectors/spotbugs/files/bin/spotbugs.bat b/src/python/review/inspectors/spotbugs/files/bin/spotbugs.bat deleted file mode 100644 index 1ff32bc0..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/spotbugs.bat +++ /dev/null @@ -1,240 +0,0 @@ -@echo off -:: Launch SpotBugs on a Windows system. -:: Adapted from scripts found at http://www.ericphelps.com/batch/ -:: This will only work on Windows NT or later! - -:: Don't affect environment outside of this invocation -setlocal - -:: ---------------------------------------------------------------------- -:: Set up default values -:: ---------------------------------------------------------------------- -set appjar=spotbugs.jar -set javahome= -set launcher=java.exe -set start=start "SpotBugs" -set jvmargs= -set debugArg= -set conserveSpaceArg= -set workHardArg= -set args= -set javaProps= -set maxheap=768 - -REM default UI is gui2 -set launchUI=2 - -:: Try finding the default SPOTBUGS_HOME directory -:: from the directory path of this script -set default_spotbugs_home=%~dp0.. - -:: Honor JAVA_HOME environment variable if it is set -if "%JAVA_HOME%"=="" goto nojavahome -if not exist "%JAVA_HOME%\bin\javaw.exe" goto nojavahome -set javahome=%JAVA_HOME%\bin\ -:nojavahome - -goto loop - -:: ---------------------------------------------------------------------- -:: Process command-line arguments -:: ---------------------------------------------------------------------- - -:shift2 -shift -:shift1 -shift - -:loop - -:: Remove surrounding quotes from %1 and %2 -set firstArg=%~1 -set secondArg=%~2 - -if "%firstArg%"=="" goto launch - -:: AddMessages -if not "%firstArg%"=="-addMessages" goto notAddMessages -set fb_mainclass=edu.umd.cs.findbugs.AddMessages -goto shift1 -:notAddMessages - -:: computeBugHistory -if not "%firstArg%"=="-computeBugHistory" goto notUpdate -set fb_mainclass=edu.umd.cs.findbugs.workflow.Update -goto shift1 -:notUpdate - -:: convertXmlToText -if not "%firstArg%"=="-xmltotext" goto notXmlToText -set fb_mainclass=edu.umd.cs.findbugs.PrintingBugReporter -goto shift1 -:notXmlToText - -:: copyBuggySource -if not "%firstArg%"=="-copyBS" goto notCopyBS -set fb_mainclass=edu.umd.cs.findbugs.workflow.CopyBuggySource -goto shift1 -:notCopyBS - -:: defectDensity -if not "%firstArg%"=="-defectDensity" goto notDefectDensity -set fb_mainclass=edu.umd.cs.findbugs.workflow.DefectDensity -goto shift1 -:notDefectDensity - -:: filterBugs -if not "%firstArg%"=="-filterBugs" goto notFilterBugs -set fb_mainclass=edu.umd.cs.findbugs.workflow.Filter -goto shift1 -:notFilterBugs - -:: listBugDatabaseInfo -if not "%firstArg%"=="-listBugDatabaseInfo" goto notListBugDatabaseInfo -set fb_mainclass=edu.umd.cs.findbugs.workflow.ListBugDatabaseInfo -goto shift1 -:notListBugDatabaseInfo - -:: mineBugHistory -if not "%firstArg%"=="-mineBugHistory" goto notMineBugHistory -set fb_mainclass=edu.umd.cs.findbugs.workflow.MineBugHistory -goto shift1 -:notMineBugHistory - -:: printAppVersion -if not "%firstArg%"=="-printAppVersion" goto notPrintAppVersion -set fb_mainclass=edu.umd.cs.findbugs.workflow.PrintAppVersion -goto shift1 -:notPrintAppVersion - -:: printClass -if not "%firstArg%"=="-printClass" goto notPrintClass -set fb_mainclass=edu.umd.cs.findbugs.workflow.PrintClass -goto shift1 -:notPrintClass - -:: rejarForAnalysis -if not "%firstArg%"=="-rejar" goto notRejar -set fb_mainclass=edu.umd.cs.findbugs.workflow.RejarClassesForAnalysis -goto shift1 -:notRejar - -:: setBugDatabaseInfo -if not "%firstArg%"=="-setInfo" goto notSetBugDatabaseInfo -set fb_mainclass=edu.umd.cs.findbugs.workflow.SetBugDatabaseInfo -goto shift1 -:notSetBugDatabaseInfo - -:: unionBugs -if not "%firstArg%"=="-unionBugs" goto notUnionBugs -set fb_mainclass=edu.umd.cs.findbugs.workflow.UnionResults -goto shift1 -:notUnionBugs - -:: xpathFind -if not "%firstArg%"=="-xpathFind" goto notXPathFind -set fb_mainclass=edu.umd.cs.findbugs.workflow.XPathFind -goto shift1 -:notXPathFind - -if not "%firstArg%"=="-gui" goto notGui -set launchUI=2 -set launcher=javaw.exe -goto shift1 -:notGui - -if not "%firstArg%"=="-gui1" goto notGui1 -set launchUI=1 -set javaProps=-Dfindbugs.launchUI=1 %javaProps% -set launcher=javaw.exe -goto shift1 -:notGui1 - -if not "%firstArg%"=="-textui" goto notTextui -set launchUI=0 -set launcher=java.exe -set start= -goto shift1 -:notTextui - -if not "%firstArg%"=="-debug" goto notDebug -set launcher=java.exe -set start= -set debugArg=-Dfindbugs.debug=true -goto shift1 -:notDebug - -if not "%firstArg%"=="-help" goto notHelp -set launchUI=help -set launcher=java.exe -set start= -goto shift1 -:notHelp - -if not "%firstArg%"=="-version" goto notVersion -set launchUI=version -set launcher=java.exe -set start= -goto shift1 -:notVersion - -if "%firstArg%"=="-home" set SPOTBUGS_HOME=%secondArg% -if "%firstArg%"=="-home" goto shift2 - -if "%firstArg%"=="-jvmArgs" set jvmargs=%secondArg% -if "%firstArg%"=="-jvmArgs" goto shift2 - -if "%firstArg%"=="-maxHeap" set maxheap=%secondArg% -if "%firstArg%"=="-maxHeap" goto shift2 - -if "%firstArg%"=="-conserveSpace" set conserveSpaceArg=-Dfindbugs.conserveSpace=true -if "%firstArg%"=="-conserveSpace" goto shift1 - -if "%firstArg%"=="-workHard" set workHardArg=-Dfindbugs.workHard=true -if "%firstArg%"=="-workHard" goto shift1 - -if "%firstArg%"=="-javahome" set javahome=%secondArg%\bin\ -if "%firstArg%"=="-javahome" goto shift2 - -if "%firstArg%"=="-property" set javaProps=-D%secondArg% %javaProps% -if "%firstArg%"=="-property" goto shift2 - -if "%firstArg%"=="" goto launch - -set args=%args% "%firstArg%" -goto shift1 - -:: ---------------------------------------------------------------------- -:: Launch FindBugs -:: ---------------------------------------------------------------------- -:launch -:: Make sure SPOTBUGS_HOME is set. -:: If it isn't, try using the default value based on the -:: directory path of the invoked script. -:: Note that this will fail miserably if the value of FINDBUGS_HOME -:: has quote characters in it. -if not "%SPOTBUGS_HOME%"=="" goto checkHomeValid -set SPOTBUGS_HOME=%default_spotbugs_home% - -:checkHomeValid -if not exist "%SPOTBUGS_HOME%\lib\%appjar%" goto homeNotSet - -:found_home -:: Launch FindBugs! -if "%fb_mainclass%"=="" goto runJar -"%javahome%%launcher%" %debugArg% %conserveSpaceArg% %workHardArg% %javaProps% "-Dspotbugs.home=%SPOTBUGS_HOME%" -Xmx%maxheap%m %jvmargs% "-Dfindbugs.launchUI=%launchUI%" -cp "%SPOTBUGS_HOME%\lib\%appjar%" %fb_mainclass% %args% -goto end -:runjar -%start% "%javahome%%launcher%" %debugArg% %conserveSpaceArg% %workHardArg% %javaProps% "-Dspotbugs.home=%SPOTBUGS_HOME%" -Xmx%maxheap%m %jvmargs% "-Dfindbugs.launchUI=%launchUI%" -jar "%SPOTBUGS_HOME%\lib\%appjar%" %args% -goto end - -:: ---------------------------------------------------------------------- -:: Report that SPOTBUGS_HOME is not set (and was not specified) -:: ---------------------------------------------------------------------- -:homeNotSet -echo Could not find SpotBugs home directory. There may be a problem -echo with the FindBugs installation. Try setting SPOTBUGS_HOME, or -echo re-installing. -goto end - -:end diff --git a/src/python/review/inspectors/spotbugs/files/bin/spotbugs.ico b/src/python/review/inspectors/spotbugs/files/bin/spotbugs.ico deleted file mode 100644 index e46c6c96..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/bin/spotbugs.ico and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/bin/spotbugs2 b/src/python/review/inspectors/spotbugs/files/bin/spotbugs2 deleted file mode 100644 index 8476db7d..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/spotbugs2 +++ /dev/null @@ -1,177 +0,0 @@ -#! /bin/sh - -# -# Simplified SpotBugs startup script. -# This is an experiment. -# - -program="$0" - -# Follow symlinks until we get to the actual file. -while [ -h "$program" ]; do - link=`ls -ld "$program"` - link=`expr "$link" : '.*-> \(.*\)'` - if [ "`expr "$link" : '/.*'`" = 0 ]; then - # Relative - dir=`dirname "$program"` - program="$dir/$link" - else - # Absolute - program="$link" - fi -done - -# Assume SpotBugs home directory is the parent -# of the directory containing the script (which should -# normally be "$spotbugs_home/bin"). -dir=`dirname "$program"` -spotbugs_home="$dir/.." - -# Handle FHS-compliant installations (e.g., Fink) -if [ -d "$spotbugs_home/share/spotbugs" ]; then - spotbugs_home="$spotbugs_home/share/spotbugs" -fi - -# Make absolute -spotbugs_home=`cd "$spotbugs_home" && pwd` - -fb_pathsep=':' - -# Handle cygwin, courtesy of Peter D. Stout -fb_osname=`uname` -if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then - spotbugs_home=`cygpath --mixed "$spotbugs_home"` - fb_pathsep=';' -fi -# Handle MKS, courtesy of Kelly O'Hair -if [ "${fb_osname}" = "Windows_NT" ]; then - fb_pathsep=';' -fi - -if [ ! -d "$spotbugs_home" ]; then - echo "The path $spotbugs_home," - echo "which is where I think SpotBugs is located," - echo "does not seem to be a directory." - exit 1 -fi - -# Choose default java binary -fb_javacmd=java -if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then - if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then - fb_javacmd=`cygpath --mixed "$JAVA_HOME"`/bin/java - else - fb_javacmd="$JAVA_HOME/bin/java" - fi -fi - -# Default UI is GUI2 -fb_launchui="2" - -# -# Stuff we're going to pass to the JVM as JVM arguments. -# -jvm_debug="" -jvm_maxheap="-Xmx768m" -jvm_ea="" -jvm_conservespace="" -jvm_user_props="" - -# -# Process command line args until we hit one we don't recognize. -# -finishedArgs=false -while [ $# -gt 0 ] && [ "$finishedArgs" = "false" ]; do - - arg=$1 - - case $arg in - -textui) - shift - fb_launchui="0" - ;; - - -gui) - shift - fb_launchui="2" - ;; - - -gui1) - shift - fb_launchui="1" - ;; - - -maxHeap) - shift - jvm_maxheap="-Xmx$1m" - shift - ;; - - -ea) - shift - jvm_ea="-ea" - ;; - - -javahome) - shift - fb_javacmd="$1/bin/java" - shift - ;; - - -debug) - shift - jvm_debug="-Dfindbugs.debug=true" - ;; - - -conserveSpace) - shift - jvm_conservespace="-Dfindbugs.conserveSpace=true" - ;; - - -property) - shift - jvm_user_props="-D$1 $jvm_user_props" - shift - ;; - - -D*=*) - jvm_user_props="$1 $user_props" - shift - ;; - - -version) - shift - fb_launchui="version" - ;; - - -help) - shift - fb_launchui="help" - ;; - - # All arguments starting from the first unrecognized arguments - # are passed on to the Java app. - *) - finishedArgs=true - ;; - esac - -done - -# Extra JVM args for MacOSX. -if [ $fb_osname = "Darwin" ]; then - fb_jvmargs="$fb_jvmargs \ - -Xdock:name=SpotBugs -Xdock:icon=${spotbugs_home}/lib/buggy.icns \ - -Dapple.laf.useScreenMenuBar=true" -fi - -# -# Launch JVM -# -exec "$fb_javacmd" \ - -classpath "$fb_appjar$fb_pathsep$CLASSPATH" \ - -Dspotbugs.home="$spotbugs_home" \ - $jvm_debug $jvm_maxheap $jvm_ea $jvm_conservespace $jvm_user_props \ - -Dfindbugs.launchUI=$fb_launchui \ - -jar $spotbugs_home/lib/spotbugs.jar \ - ${@:+"$@"} diff --git a/src/python/review/inspectors/spotbugs/files/bin/unionBugs b/src/python/review/inspectors/spotbugs/files/bin/unionBugs deleted file mode 100644 index 93593cc2..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/unionBugs +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/sh - -# Deprecated - -# Create the union of two results files, preserving annotations in both files -# in the result. - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.workflow.UnionResults "$@" diff --git a/src/python/review/inspectors/spotbugs/files/bin/xpathFind b/src/python/review/inspectors/spotbugs/files/bin/xpathFind deleted file mode 100644 index 3bdd9aca..00000000 --- a/src/python/review/inspectors/spotbugs/files/bin/xpathFind +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec "$(dirname $0)/fbwrap" edu.umd.cs.findbugs.xml.XPathFind "$@" diff --git a/src/python/review/inspectors/spotbugs/files/lib/Saxon-HE-9.9.1-2.jar b/src/python/review/inspectors/spotbugs/files/lib/Saxon-HE-9.9.1-2.jar deleted file mode 100644 index eae4737f..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/Saxon-HE-9.9.1-2.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/asm-7.3.1.jar b/src/python/review/inspectors/spotbugs/files/lib/asm-7.3.1.jar deleted file mode 100644 index 8a502662..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/asm-7.3.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/asm-analysis-7.3.1.jar b/src/python/review/inspectors/spotbugs/files/lib/asm-analysis-7.3.1.jar deleted file mode 100644 index 1f83a5ed..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/asm-analysis-7.3.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/asm-commons-7.3.1.jar b/src/python/review/inspectors/spotbugs/files/lib/asm-commons-7.3.1.jar deleted file mode 100644 index 65fb30e7..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/asm-commons-7.3.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/asm-tree-7.3.1.jar b/src/python/review/inspectors/spotbugs/files/lib/asm-tree-7.3.1.jar deleted file mode 100644 index 28858f4e..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/asm-tree-7.3.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/asm-util-7.3.1.jar b/src/python/review/inspectors/spotbugs/files/lib/asm-util-7.3.1.jar deleted file mode 100644 index 4fe6c527..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/asm-util-7.3.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/bcel-6.4.1.jar b/src/python/review/inspectors/spotbugs/files/lib/bcel-6.4.1.jar deleted file mode 100644 index 9b70e300..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/bcel-6.4.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/commons-lang-2.6.jar b/src/python/review/inspectors/spotbugs/files/lib/commons-lang-2.6.jar deleted file mode 100644 index 98467d3a..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/commons-lang-2.6.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/config/log4j2.xml b/src/python/review/inspectors/spotbugs/files/lib/config/log4j2.xml deleted file mode 100644 index 792602b8..00000000 --- a/src/python/review/inspectors/spotbugs/files/lib/config/log4j2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/python/review/inspectors/spotbugs/files/lib/dom4j-2.1.1.jar b/src/python/review/inspectors/spotbugs/files/lib/dom4j-2.1.1.jar deleted file mode 100644 index cda47db4..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/dom4j-2.1.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/icu4j-63.1.jar b/src/python/review/inspectors/spotbugs/files/lib/icu4j-63.1.jar deleted file mode 100644 index 730335ed..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/icu4j-63.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/jaxen-1.1.6.jar b/src/python/review/inspectors/spotbugs/files/lib/jaxen-1.1.6.jar deleted file mode 100644 index 52f47a4f..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/jaxen-1.1.6.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/jcip-annotations-1.0.jar b/src/python/review/inspectors/spotbugs/files/lib/jcip-annotations-1.0.jar deleted file mode 100644 index 06e9066b..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/jcip-annotations-1.0.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/jsr305-3.0.2.jar b/src/python/review/inspectors/spotbugs/files/lib/jsr305-3.0.2.jar deleted file mode 100644 index 59222d9c..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/jsr305-3.0.2.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/log4j-api-2.11.1.jar b/src/python/review/inspectors/spotbugs/files/lib/log4j-api-2.11.1.jar deleted file mode 100644 index 96362a6f..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/log4j-api-2.11.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/log4j-core-2.11.1.jar b/src/python/review/inspectors/spotbugs/files/lib/log4j-core-2.11.1.jar deleted file mode 100644 index 310fa62a..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/log4j-core-2.11.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/log4j-slf4j18-impl-2.11.1.jar b/src/python/review/inspectors/spotbugs/files/lib/log4j-slf4j18-impl-2.11.1.jar deleted file mode 100644 index 8fc4d2ec..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/log4j-slf4j18-impl-2.11.1.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/slf4j-api-1.8.0-alpha2.jar b/src/python/review/inspectors/spotbugs/files/lib/slf4j-api-1.8.0-alpha2.jar deleted file mode 100644 index 7a2a9b2d..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/slf4j-api-1.8.0-alpha2.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/slf4j-api-1.8.0-beta4.jar b/src/python/review/inspectors/spotbugs/files/lib/slf4j-api-1.8.0-beta4.jar deleted file mode 100644 index c6458a70..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/slf4j-api-1.8.0-beta4.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/spotbugs-annotations.jar b/src/python/review/inspectors/spotbugs/files/lib/spotbugs-annotations.jar deleted file mode 100644 index 628e935b..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/spotbugs-annotations.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/spotbugs-ant.jar b/src/python/review/inspectors/spotbugs/files/lib/spotbugs-ant.jar deleted file mode 100644 index 24353506..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/spotbugs-ant.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/lib/spotbugs.jar b/src/python/review/inspectors/spotbugs/files/lib/spotbugs.jar deleted file mode 100644 index 208976fd..00000000 Binary files a/src/python/review/inspectors/spotbugs/files/lib/spotbugs.jar and /dev/null differ diff --git a/src/python/review/inspectors/spotbugs/files/plugin/README b/src/python/review/inspectors/spotbugs/files/plugin/README deleted file mode 100644 index 6e4a5e1d..00000000 --- a/src/python/review/inspectors/spotbugs/files/plugin/README +++ /dev/null @@ -1,8 +0,0 @@ - -Put the jar files for SpotBugs plugins in this directory. -For example, you can download the fb-contrib plugin from: - https://github.com/mebigfatguy/fb-contrib - -You should carefully evaluate any Spotbugs plugins to determine whether -the issues they report are suitable and appropriate for your project. - diff --git a/src/python/review/inspectors/spotbugs/files/spotbugs-exclude.xml b/src/python/review/inspectors/spotbugs/files/spotbugs-exclude.xml deleted file mode 100644 index 0dc8fc00..00000000 --- a/src/python/review/inspectors/spotbugs/files/spotbugs-exclude.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/python/review/inspectors/spotbugs/files/src/xsl/color.xsl b/src/python/review/inspectors/spotbugs/files/src/xsl/color.xsl deleted file mode 100644 index ee0c1a9b..00000000 --- a/src/python/review/inspectors/spotbugs/files/src/xsl/color.xsl +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - - - Priority - Details - - - - - - - SpotBugs Report - - - - - - - - -

SpotBugs Report

-

Produced using SpotBugs .

-

Project: - - - - - -

- - - - - - -
-

Metrics

- -
-

Summary

- - - - - - - - - - - - tablerow0 - tablerow1 - - - - - - - - - - - tablerow0 - tablerow1 - - - - - - -
Warning TypeNumber
Warnings
Total
-
- -



- -

Warnings

- -

Click on each warning link to see a full description of the issue, and - details of how to resolve it.

- - - - - - - - - Warnings - Warnings_ - - - -



-

Warning Types

- - - - - - - - -
- - - - - - - - high - medium - low - #fdfdfd - - - - High - Medium - Low - Unknown - - - - -
-
-
- - - In file , - - - line - - - lines - to - - - - - -
-
-
-
- - -
- - -

- -



-
- - - - - - -

- - - - - - - - - - - - - - -

None

-



-
- - - - - -

lines of code analysed, - in classes, - in packages.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MetricTotalDensity*
High Priority Warnings
Medium Priority Warnings
Low Priority Warnings
Total Warnings
-

(* Defects per thousand lines of non-commenting source statements)

-



- -
- -
diff --git a/src/python/review/inspectors/spotbugs/files/src/xsl/default.xsl b/src/python/review/inspectors/spotbugs/files/src/xsl/default.xsl deleted file mode 100644 index a2b793a9..00000000 --- a/src/python/review/inspectors/spotbugs/files/src/xsl/default.xsl +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - - - - - -&nbsp; - - - - - - Code - Warning - - - - - - - SpotBugs Report - - - - - - - - - -

SpotBugs Report

- -

Project Information

- - -

Metrics

- - -

Contents

- - -

Summary

- - - - - - - - - - - - tablerow0 - tablerow1 - - - - - - - - - - - tablerow0 - tablerow1 - - - - - - -
Warning TypeNumber
Warnings
Total
- -

Warnings

- -

Click on a warning row to see full context information.

- - - - - - - - - Warnings - Warnings_ - - - -

Details

- - - - - - - - -
- - -

Project: - - - - -

-

SpotBugs version:

- -

Code analyzed:

-
    - -
  • -
    -
-



-
- - - - - - - - priority- - - - - - - - - - - - - - - - - - - - - -

:

- -
- - - - - - -

- - - - - - -
-
- - - - - -

lines of code analyzed, - in classes, - in packages.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MetricTotalDensity*
High Priority Warnings - - - - - - - - -
Medium Priority Warnings - - - - - - - - -
Low Priority Warnings - - - - - - - - -
Total Warnings
-

(* Defects per Thousand lines of non-commenting source statements)

-



- -
- -
- - diff --git a/src/python/review/inspectors/spotbugs/files/src/xsl/fancy-hist.xsl b/src/python/review/inspectors/spotbugs/files/src/xsl/fancy-hist.xsl deleted file mode 100644 index eaac4a7f..00000000 --- a/src/python/review/inspectors/spotbugs/files/src/xsl/fancy-hist.xsl +++ /dev/null @@ -1,1290 +0,0 @@ - - - - - - - - - - - - ( - - ) - - analysis - - for - - - - - of release - - - - - - - - - <xsl:text>SpotBugs</xsl:text> - <xsl:value-of select="$titlePart"/> - - - - - -

- SpotBugs - -

- - - -
- -
-
- Computing data... -
- - -
-
-

Package Summary

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PackageCode SizeTotal BugsBugs P1Bugs P2Bugs P3Bugs Experimental
- Overall ( - - packages, - - classes) -
-
- -
-
-

Analyzed Files:

-
    - - -
  • -
    -
-
-
-

Used Libraries:

-
    - - - - -
  • -
    -
    - -
  • None
  • -
    -
    -
-
-
-

Source Files:

-
    - - - - -
  • -
    -
    - -
  • None
  • -
    -
    -
-
-
-

Plugins:

-
    - - - - -
  • (enabled: )
  • -
    -
    - -
  • None
  • -
    -
    -
-
-
-

Analysis Errors:

-
    - - -
  • - Missing ref classes for analysis: -
      - - -
    • -
      -
    -
  • -
    - -
  • None
  • -
    -
    -
-
-
-
Loading...
-
Loading...
-
Loading...
-
- - - - -
-
diff --git a/src/python/review/inspectors/spotbugs/files/src/xsl/fancy.xsl b/src/python/review/inspectors/spotbugs/files/src/xsl/fancy.xsl deleted file mode 100644 index a32f4299..00000000 --- a/src/python/review/inspectors/spotbugs/files/src/xsl/fancy.xsl +++ /dev/null @@ -1,849 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - SpotBugs (<xsl:value-of select="/BugCollection/@version" />) - Analysis for - <xsl:choose> - <xsl:when test='string-length(/BugCollection/Project/@projectName)>0'><xsl:value-of select="/BugCollection/Project/@projectName" /></xsl:when> - <xsl:otherwise><xsl:value-of select="/BugCollection/Project/@filename" /></xsl:otherwise> - </xsl:choose> - - - - - - -
-

- SpotBugs () - Analysis for - - - - -

- - - - - - - - - - -
- tip- - tip - /
- -
-
- - - -
- b-uid-- - - - - - - -
-
-
-
-
- -
-
-
-
-
-
-
- - -
- - - - -
-

SpotBugs Analysis generated at:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PackageCode SizeBugsHigh Prio BugsMedium Prio BugsLow Prio BugsExp. BugsRatio
- Overall - ( packages), - ( classes) -
-
-
- - - - - - - - - - - - b-1 - &nbsp;&nbsp; - High Prio - - b-2 - &nbsp;&nbsp; - Medium Prio - - b-3 - &nbsp;&nbsp; - Low Prio - - b-4 - &nbsp;&nbsp; - Exp. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- category--and-code--and-bug- - category--and-code--and-bug- - b-uid-- - - - - - - - -
-
-
- - - - - - - - - - - 0 - - - - - - 0 - - - - - - 0 - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - 0 - - - - - - 0 - - - - - - 0 - - - - - -
- -
- package--and-class- - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - -
- -
- package--and-class--and-type- - package--and-class--and-type- - b-uid-- - - - - - - - -
-
-
- -
diff --git a/src/python/review/inspectors/spotbugs/files/src/xsl/plain.xsl b/src/python/review/inspectors/spotbugs/files/src/xsl/plain.xsl deleted file mode 100644 index 99edcf7a..00000000 --- a/src/python/review/inspectors/spotbugs/files/src/xsl/plain.xsl +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - - Warning - Priority - Details - - - - - - - SpotBugs Report - - - - - - - -

SpotBugs Report

-

Produced using SpotBugs .

-

Project: - - - - -

-

Metrics

- - -

Summary

- - - - - - - - - - - - tablerow0 - tablerow1 - - - - - - - - - - - tablerow0 - tablerow1 - - - - - - -
Warning TypeNumber
Warnings
Total
-



- -

Warnings

- -

Click on each warning link to see a full description of the issue, and - details of how to resolve it.

- - - - - - - - - Warnings - Warnings_ - - - -



-

Warning Types

- - - - - - - - -
- - - - - - - - - - - High - Medium - Low - Unknown - - - -



- - - -
In file , - - - line - - - lines - to - - -
- - -
-
-

- - -
- - -

- -



-
- - - - - - -

- - - - - - - - - - - - - - -

None

-



-
- - - - - -

lines of code analyzed, - in classes, - in packages.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MetricTotalDensity*
High Priority Warnings - - - - - - - - -
Medium Priority Warnings - - - - - - - - -
Low Priority Warnings - - - - - - - - -
Total Warnings - - - - - - - - - - -
-

(* Defects per Thousand lines of non-commenting source statements)

-



- -
- -
diff --git a/src/python/review/inspectors/spotbugs/files/src/xsl/summary.xsl b/src/python/review/inspectors/spotbugs/files/src/xsl/summary.xsl deleted file mode 100644 index bfdb5973..00000000 --- a/src/python/review/inspectors/spotbugs/files/src/xsl/summary.xsl +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <xsl:value-of select="$PAGE.TITLE" /> - -

-

Analysis for - - - - - -

-

-

- -
-

- -
() -

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -
       
-
-
-
- -
diff --git a/src/python/review/inspectors/spotbugs/spotbugs.py b/src/python/review/inspectors/spotbugs/spotbugs.py deleted file mode 100644 index 59f78750..00000000 --- a/src/python/review/inspectors/spotbugs/spotbugs.py +++ /dev/null @@ -1,105 +0,0 @@ -import logging -import re -from collections import Counter -from pathlib import Path -from typing import Any, Dict, List - -from src.python.review.common.file_system import get_all_file_system_items -from src.python.review.common.java_compiler import javac, javac_project -from src.python.review.common.subprocess_runner import run_in_subprocess -from src.python.review.inspectors.base_inspector import BaseInspector -from src.python.review.inspectors.inspector_type import InspectorType -from src.python.review.inspectors.issue import BaseIssue, CodeIssue, IssueDifficulty, IssueType - -logger = logging.getLogger(__name__) - -PATH_SPOTBUGS_FILES = Path(__file__).parent / 'files' -PATH_SPOTBUGS_EXECUTABLE = PATH_SPOTBUGS_FILES / 'bin' / 'spotbugs' -PATH_SPOTBUGS_EXCLUDE = PATH_SPOTBUGS_FILES / 'spotbugs-exclude.xml' - - -class SpotbugsInspector(BaseInspector): - inspector_type = InspectorType.SPOTBUGS - - @classmethod - def _create_command(cls, path: Path) -> List[str]: - return [ - PATH_SPOTBUGS_EXECUTABLE, - '-quiet', # disable warning and messages - '-exclude', - PATH_SPOTBUGS_EXCLUDE, - '-textui', - '-medium', - str(path), - ] - - def inspect(self, path: Path, config: Dict[str, Any]) -> List[BaseIssue]: - if path.is_file(): - is_successful = javac(path) - else: - is_successful = javac_project(path) - - if not is_successful: - logger.error('%s: cant compile java files') - - return self._inspect_compiled(path) - - def _inspect_compiled(self, path: Path) -> List[BaseIssue]: - if path.is_dir(): - command = self._create_command(path) - else: - command = self._create_command(path.parent) - output = run_in_subprocess(command) - - if path.is_file(): - file_paths = [path] - else: - file_paths = get_all_file_system_items(path) - - java_file_paths = [file_path for file_path in file_paths if file_path.suffix == '.java'] - file_path_counter = Counter(java_file_paths) - file_name_to_path = {file_path.name: file_path for file_path in java_file_paths} - return self._parse(output, file_path_counter, file_name_to_path) - - @classmethod - def _parse(cls, output: str, file_path_counter: Dict[Path, int], - file_name_to_path: Dict[str, Path]) -> List[BaseIssue]: - lines = [line for line in output.split('\n') if line] - issues: List[BaseIssue] = [] - for line in lines: - try: - issue = cls._parse_single_line(line, file_name_to_path) - file_path = issue.file_path - if file_path_counter[file_path] == 1: - issues.append(issue) - else: - logger.warning(f'Cannot inspect duplicate file: {file_path}') - except Exception as e: - logger.warning(f'Cannot parse output line {line}', e) - return issues - - @classmethod - def _parse_single_line(cls, line: str, file_name_to_path: Dict[str, Path]) -> BaseIssue: - file_name = re.compile(r'(At|In|at|in) ([^ ]+.java)').findall(line)[-1][1].strip() - - desc_start_index = line.find(':') - desc_end_index = max(line.rfind(':'), line.rfind('.java')) - - issue_class = line[:desc_start_index].strip() - long_desc = line[desc_start_index + 1: desc_end_index].strip() - short_desc = long_desc.split(' ')[0] - - line_number_str = line[desc_end_index + 1:].strip() - line_number_parsed = re.compile(r'\d+').findall(line_number_str) - line_number = int(line_number_parsed[0]) if line_number_parsed else 0 - - return CodeIssue( - file_path=file_name_to_path[file_name], - line_no=line_number, - column_no=1, - type=IssueType.ERROR_PRONE, - origin_class=issue_class, - description=short_desc, - inspector_type=cls.inspector_type, - difficulty=IssueDifficulty.get_by_issue_type(IssueType.ERROR_PRONE), - ) diff --git a/test/python/functional_tests/conftest.py b/test/python/functional_tests/conftest.py index 64b9b049..99131521 100644 --- a/test/python/functional_tests/conftest.py +++ b/test/python/functional_tests/conftest.py @@ -13,7 +13,7 @@ @dataclass class LocalCommandBuilder: verbosity: int = 2 - disable: List[str] = field(default_factory=lambda: ['intellij', 'spotbugs']) + disable: List[str] = field(default_factory=lambda: []) allow_duplicates: bool = False language_version: Optional[str] = None n_cpu: int = 1 diff --git a/test/python/inspectors/test_filter_duplicate_issues.py b/test/python/inspectors/test_filter_duplicate_issues.py index 26ce7683..9f088530 100644 --- a/test/python/inspectors/test_filter_duplicate_issues.py +++ b/test/python/inspectors/test_filter_duplicate_issues.py @@ -76,16 +76,6 @@ def test_filter_duplicate_issues_when_several_inspectors() -> None: type=IssueType.COMPLEXITY, difficulty=IssueDifficulty.HARD, ), - CodeIssue( - file_path=Path('code.py'), - line_no=10, - description='', - inspector_type=InspectorType.INTELLIJ, - column_no=1, - origin_class='', - type=IssueType.COMPLEXITY, - difficulty=IssueDifficulty.HARD, - ), CodeIssue( file_path=Path('code.py'), line_no=11, @@ -106,21 +96,11 @@ def test_filter_duplicate_issues_when_several_inspectors() -> None: origin_class='', difficulty=IssueDifficulty.MEDIUM, ), - CodeIssue( - file_path=Path('code.py'), - line_no=11, - description='', - type=IssueType.ERROR_PRONE, - inspector_type=InspectorType.INTELLIJ, - column_no=1, - origin_class='', - difficulty=IssueDifficulty.HARD, - ), ] filtered_issues = filter_duplicate_issues(issues) - assert set(filtered_issues) == {issues[0], issues[3], issues[4], issues[5]} + assert set(filtered_issues) == {issues[0], issues[2], issues[3]} def test_filter_duplicate_issues_when_several_issues_in_line_no() -> None: @@ -165,28 +145,8 @@ def test_filter_duplicate_issues_when_several_issues_in_line_no() -> None: type=IssueType.COMPLEXITY, difficulty=IssueDifficulty.HARD, ), - CodeIssue( - file_path=Path('code.py'), - line_no=10, - description='', - inspector_type=InspectorType.INTELLIJ, - column_no=1, - origin_class='', - type=IssueType.COMPLEXITY, - difficulty=IssueDifficulty.HARD, - ), - CodeIssue( - file_path=Path('code.py'), - line_no=10, - description='', - inspector_type=InspectorType.INTELLIJ, - column_no=1, - origin_class='', - type=IssueType.COMPLEXITY, - difficulty=IssueDifficulty.HARD, - ), ] filtered_issues = filter_duplicate_issues(issues) - assert set(filtered_issues) == {issues[1], issues[2], issues[4], issues[5]} + assert set(filtered_issues) == {issues[1], issues[2], issues[3]} diff --git a/test/python/inspectors/test_local_review.py b/test/python/inspectors/test_local_review.py index e7bf3b8b..0d5583ee 100644 --- a/test/python/inspectors/test_local_review.py +++ b/test/python/inspectors/test_local_review.py @@ -4,7 +4,6 @@ import pytest from src.python.review.application_config import ApplicationConfig -from src.python.review.inspectors.inspector_type import InspectorType from src.python.review.quality.model import QualityType from src.python.review.reviewers.perform_review import OutputFormat, PathNotExists, perform_and_print_review @@ -20,7 +19,7 @@ @pytest.fixture def config() -> ApplicationConfig: return ApplicationConfig( - disabled_inspectors={InspectorType.INTELLIJ}, + disabled_inspectors=set(), allow_duplicates=False, n_cpu=1, inspectors_config={"n_cpu": 1}, diff --git a/test/python/inspectors/test_spotbugs_inspector.py b/test/python/inspectors/test_spotbugs_inspector.py deleted file mode 100644 index be8da3d1..00000000 --- a/test/python/inspectors/test_spotbugs_inspector.py +++ /dev/null @@ -1,92 +0,0 @@ -from pathlib import Path - -from src.python.review.inspectors.inspector_type import InspectorType -from src.python.review.inspectors.spotbugs.spotbugs import SpotbugsInspector - - -def test_parse_single_line_when_lines_range(): - line = ('M B HE: Person defines equals and uses Object.hashCode() ' - 'At test_when_only_equals_overridden.java:[lines 15-27]') - - issue = SpotbugsInspector._parse_single_line( - line, { - 'test_when_only_equals_overridden.java': - Path('test_when_only_equals_overridden.java')}) - - assert issue.origin_class == 'M B HE' - assert issue.file_path == Path('test_when_only_equals_overridden.java') - assert issue.description == 'Person defines equals and uses Object.hashCode()' - assert issue.line_no == 15 - assert issue.inspector_type == InspectorType.SPOTBUGS - - print(issue) - - -def test_parse_single_line_when_single_line(): - line = ('M C UwF: Unwritten field: Person.firstName ' - 'At test_when_only_equals_overridden.java:[line 27]') - - issue = SpotbugsInspector._parse_single_line( - line, { - 'test_when_only_equals_overridden.java': - Path('test_when_only_equals_overridden.java')}) - - assert issue.origin_class == 'M C UwF' - assert issue.file_path == Path('test_when_only_equals_overridden.java') - assert issue.description == 'Unwritten field: Person.firstName' - assert issue.line_no == 27 - assert issue.inspector_type == InspectorType.SPOTBUGS - - print(issue) - - -def test_parse_single_line_when_no_line(): - line = ('M P UuF: Unused field: Person.testField ' - 'At test_when_only_equals_overridden.java') - - issue = SpotbugsInspector._parse_single_line( - line, { - 'test_when_only_equals_overridden.java': - Path('test_when_only_equals_overridden.java')}) - - assert issue.origin_class == 'M P UuF' - assert issue.file_path == Path('test_when_only_equals_overridden.java') - assert issue.description == 'Unused field: Person.testField' - assert issue.line_no == 0 - assert issue.inspector_type == InspectorType.SPOTBUGS - - print(issue) - - -def test(): - line = ('M C NP: Read of unwritten field entity in CommandPickItem.execute() ' - 'At hyperskill39939.java:[line 46]') - - issue = SpotbugsInspector._parse_single_line( - line, {'hyperskill39939.java': Path('hyperskill39939.java')}) - - assert issue.origin_class == 'M C NP' - assert issue.file_path == Path('hyperskill39939.java') - assert issue.description == 'Read of unwritten field entity in CommandPickItem.execute()' - assert issue.line_no == 46 - assert issue.inspector_type == InspectorType.SPOTBUGS - - print(issue) - - -def test_parse_with_filename_in_message(): - line = ('M P UuF: Public class Main should be declared in Main.java ' - 'In test_when_only_equals_overridden.java') - - issue = SpotbugsInspector._parse_single_line( - line, { - 'test_when_only_equals_overridden.java': - Path('test_when_only_equals_overridden.java')}) - - assert issue.origin_class == 'M P UuF' - assert issue.file_path == Path('test_when_only_equals_overridden.java') - assert issue.description == 'Public class Main should be declared in Main.java' - assert issue.line_no == 0 - assert issue.inspector_type == InspectorType.SPOTBUGS - - print(issue)