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

refactor: Fix CodeQL errors and warnings #252

Merged
merged 39 commits into from
Feb 20, 2024
Merged

Conversation

gfieni
Copy link
Contributor

@gfieni gfieni commented Feb 20, 2024

This PR fixes all the errors and warnings raised by CodeQL.

Use an Interface instead of Inheritance, and move the `cli_parser` attribute inside the classes because the types are too different.
The SubgroupConfigParsingManager expects a SubgroupConfigParser, and RootConfigParsingManager expects a RootConfigParser.
Even if both inherit from BaseConfigParser, their calling conventions differ too much, and it raises warnings in Pycharm and CodeQL.
@gfieni gfieni force-pushed the refactor/fix-codeql-warnings branch from 389789c to acf4c76 Compare February 20, 2024 13:53
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: 45 lines in your changes are missing coverage. Please review.

Comparison is base (fbd3aa9) 66.67% compared to head (acf4c76) 66.93%.
Report is 6 commits behind head on master.

❗ Current head acf4c76 differs from pull request most recent head 389789c. Consider uploading reports for the commit 389789c to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #252      +/-   ##
==========================================
+ Coverage   66.67%   66.93%   +0.25%     
==========================================
  Files          86       86              
  Lines        3655     3653       -2     
==========================================
+ Hits         2437     2445       +8     
+ Misses       1218     1208      -10     
Files Coverage Δ
src/powerapi/cli/config_parser.py 91.78% <100.00%> (+0.25%) ⬆️
src/powerapi/database/base_db.py 64.28% <100.00%> (ø)
src/powerapi/database/influxdb2.py 57.40% <ø> (ø)
src/powerapi/database/mongodb.py 48.07% <100.00%> (ø)
src/powerapi/database/socket_db.py 45.45% <100.00%> (-0.98%) ⬇️
src/powerapi/dispatch_rule/dispatch_rule.py 85.71% <100.00%> (+2.38%) ⬆️
src/powerapi/dispatch_rule/hwpc_dispatch_rule.py 97.82% <100.00%> (+0.04%) ⬆️
src/powerapi/dispatch_rule/power_dispatch_rule.py 100.00% <100.00%> (ø)
src/powerapi/pusher/simple/simple_pusher_actor.py 72.72% <100.00%> (-2.28%) ⬇️
src/powerapi/report/formula_report.py 95.45% <100.00%> (-0.20%) ⬇️
... and 13 more

@gfieni gfieni force-pushed the refactor/fix-codeql-warnings branch from acf4c76 to 389789c Compare February 20, 2024 13:56
Copy link

Quality Gate Passed Quality Gate passed

Issues
9 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@gfieni gfieni merged commit 21f60bf into master Feb 20, 2024
13 checks passed
@gfieni gfieni deleted the refactor/fix-codeql-warnings branch February 20, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant