Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspectors fix #39

Merged
merged 3 commits into from
May 31, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add origin class for maintainability index
  • Loading branch information
GirZ0n committed May 30, 2021
commit ef5a06d8f0eb5be18d90056a804a9f381aee1535
7 changes: 6 additions & 1 deletion src/python/review/inspectors/radon/radon.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from src.python.review.inspectors.tips import get_maintainability_index_tip


MAINTAINABILITY_ORIGIN_CLASS = "RAD100"


class RadonInspector(BaseInspector):
inspector_type = InspectorType.RADON

Expand Down Expand Up @@ -41,7 +44,9 @@ def mi_parse(cls, mi_output: str) -> List[BaseIssue]:
file_path = Path(groups[0])
maintainability_lack = convert_percentage_of_value_to_lack_of_value(float(groups[1]))

issue_data = IssueData.get_base_issue_data_dict(file_path, cls.inspector_type)
issue_data = IssueData.get_base_issue_data_dict(
file_path, cls.inspector_type, origin_class=MAINTAINABILITY_ORIGIN_CLASS
)
issue_data[IssueData.DESCRIPTION.value] = get_maintainability_index_tip()
issue_data[IssueData.MAINTAINABILITY_LACK.value] = maintainability_lack
issue_data[IssueData.ISSUE_TYPE.value] = IssueType.MAINTAINABILITY
Expand Down