Skip to content

chore(ci): configure Codacy: no Bandit on tests, skip the Dynamixel and ROS sketches - #888

Merged
petercorke merged 2 commits into
mainfrom
chore/codacy-config
Oct 22, 2026
Merged

petercorke merged 2 commits into
mainfrom
chore/codacy-config

Conversation

@petercorke

@petercorke petercorke commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

What

Adds .codacy.yml with two exclusions.

  1. Codacy's Bandit check does not run on tests/, as bdsim already does. A plain assert is the correct way to check something in a test; Bandit_B101 is meant for an assert that validates input in library code, which python -O removes. The check still applies to src/.

  2. backends/Dynamixel and backends/ROS are not analysed at all. They are unmaintained sketches for hardware with no tests, and are already excluded from mypy.

CONTRIBUTING.md and AGENTS.md said Codacy flags asserts in tests and to ignore it. They now say Bandit is not run there.

Why

Codacy reports 1183 issues on main (grade B, 89). 471 are Bandit_B101, and 336 of those are in tests/. 182 more are in the Dynamixel and ROS sketches (132 from the vendored Dynamixel SDK).

Not changed

No code, tests or CI behavior. Codacy is advisory and is not a required check. The other things that may affect the grade (duplication, complexity, the vendored Eigen headers) are left for later, once this shows its effect on the next analysis.

Checked

The YAML parses. The effect on the Codacy score is not known until the next analysis of main.

🤖 Generated with Claude Code

A plain assert is how a test checks something.  Bandit_B101 is meant for an
assert that validates input in library code, since python -O removes it.  Of
the 1183 issues Codacy reported on main, 471 were B101, and 336 of those were
in tests/.  The check still applies to src/.

CONTRIBUTING.md and AGENTS.md said that Codacy flags asserts in tests and to
ignore it; they now say it is not run there.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@petercorke
petercorke enabled auto-merge (squash) October 22, 2026 11:04
…odacy

They are unmaintained sketches for hardware with no tests, and are already
excluded from mypy.  Of the 1183 issues Codacy reported on main, 182 were in
them (165 Dynamixel, 17 ROS), 132 of those from the vendored Dynamixel SDK.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@petercorke petercorke changed the title chore(ci): do not run Codacy's Bandit check on the tests chore(ci): configure Codacy: no Bandit on tests, skip the Dynamixel and ROS sketches Oct 22, 2026
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@petercorke
petercorke merged commit f8e246b into main Oct 22, 2026
42 of 44 checks passed
@petercorke
petercorke deleted the chore/codacy-config branch October 22, 2026 21:20
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (31d99a9) to head (0e486f4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #888   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        146     146           
  Lines      17295   17295           
=====================================
  Misses     17295   17295           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

petercorke added a commit that referenced this pull request Oct 23, 2026
Starting rtbtool imports RTB and IPython, which took over 15 s on the Windows
runner and failed test_options_envvar and test_run_script in CI twice in one
day (on #888 and #890).  CI stops a test at 50 s.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant