Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TFS
controller
Commits
594af8b9
Commit
594af8b9
authored
1 month ago
by
Carlos Natalino Da Silva
Browse files
Options
Downloads
Patches
Plain Diff
Preliminary report
parent
bf1441b8
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
code_quality_analyzer.py
+5
-11
5 additions, 11 deletions
code_quality_analyzer.py
code_quality_report.png
+0
-0
0 additions, 0 deletions
code_quality_report.png
pyproject.toml
+26
-0
26 additions, 0 deletions
pyproject.toml
with
31 additions
and
11 deletions
code_quality_analyzer.py
+
5
−
11
View file @
594af8b9
...
@@ -13,6 +13,7 @@ import json
...
@@ -13,6 +13,7 @@ import json
from
pathlib
import
Path
from
pathlib
import
Path
from
collections
import
defaultdict
,
Counter
from
collections
import
defaultdict
,
Counter
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
import
numpy
as
np
import
seaborn
as
sns
import
seaborn
as
sns
from
typing
import
Dict
,
List
,
Tuple
,
Any
from
typing
import
Dict
,
List
,
Tuple
,
Any
import
argparse
import
argparse
...
@@ -77,10 +78,10 @@ class CodeQualityAnalyzer:
...
@@ -77,10 +78,10 @@ class CodeQualityAnalyzer:
"""
Run all code quality tools.
"""
"""
Run all code quality tools.
"""
tools
=
{
tools
=
{
'
ruff
'
:
[
'
ruff
'
,
'
check
'
,
str
(
self
.
src_path
)],
'
ruff
'
:
[
'
ruff
'
,
'
check
'
,
str
(
self
.
src_path
)],
'
flake8
'
:
[
'
flake8
'
,
str
(
self
.
src_path
)],
#
'flake8': ['flake8', str(self.src_path)],
'
mypy
'
:
[
'
mypy
'
,
str
(
self
.
src_path
)],
#
'mypy': ['mypy', str(self.src_path)],
'
pylint
'
:
[
'
pylint
'
,
str
(
self
.
src_path
)],
#
'pylint': ['pylint', str(self.src_path)],
'
isort
'
:
[
'
isort
'
,
'
--check-only
'
,
'
--diff
'
,
str
(
self
.
src_path
)],
#
'isort': ['isort', '--check-only', '--diff', str(self.src_path)],
'
black
'
:
[
'
black
'
,
'
--check
'
,
'
--diff
'
,
str
(
self
.
src_path
)]
'
black
'
:
[
'
black
'
,
'
--check
'
,
'
--diff
'
,
str
(
self
.
src_path
)]
}
}
...
@@ -305,13 +306,6 @@ def main():
...
@@ -305,13 +306,6 @@ def main():
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
# Import numpy for matplotlib
try
:
import
numpy
as
np
except
ImportError
:
print
(
"
Error: numpy is required for plotting. Install it with: pip install numpy
"
)
return
analyzer
=
CodeQualityAnalyzer
(
args
.
src_path
)
analyzer
=
CodeQualityAnalyzer
(
args
.
src_path
)
analyzer
.
run_analysis
()
analyzer
.
run_analysis
()
...
...
This diff is collapsed.
Click to expand it.
code_quality_report.png
0 → 100644
+
0
−
0
View file @
594af8b9
503 KiB
This diff is collapsed.
Click to expand it.
pyproject.toml
0 → 100644
+
26
−
0
View file @
594af8b9
[tool.black]
line-length
=
88
skip-string-normalization
=
true
[tool.isort]
profile
=
"black"
line_length
=
88
src_paths
=
"."
skip_gitignore
=
true
[tool.mypy]
strict
=
true
strict_equality
=
true
no_implicit_optional
=
true
warn_return_any
=
true
warn_unused_configs
=
true
warn_redundant_casts
=
true
ignore_missing_imports
=
true
ignore_missing_imports_per_module
=
true
disallow_untyped_decorators
=
false
disallow_untyped_defs
=
true
disallow_incomplete_defs
=
true
disallow_subclassing_any
=
false
disallow_any_unimported
=
false
disallow_any_explicit
=
true
disallow_any_generics
=
true
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment