Skip to content

test: integrate pylint into bazel - #325

Draft
furtib wants to merge 3 commits into
Ericsson:mainfrom
furtib:bazel-pylint
Draft

test: integrate pylint into bazel#325
furtib wants to merge 3 commits into
Ericsson:mainfrom
furtib:bazel-pylint

Conversation

@furtib

@furtib furtib commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Why:
We want to run pylint just as easily as Buildifier.

What:

  • Added a runner for pylint.
  • Obtain pylint through Bazel.
  • Removed unnecessary __init__.py files from src/ and test/foss. (Others are necessary for pytest.)

Addresses:
none

Note:
CI will fail due to lint issues in the caching tests see #324.

@furtib
furtib requested a review from Szelethus August 31, 2026 10:27
@furtib furtib self-assigned this Aug 31, 2026
@furtib furtib added enhancement New feature or request test ☑️ Adding or refactoring tests labels Aug 31, 2026

@nettle nettle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kudos @furtib!

Comment on lines +2 to +3
--hash=sha256:52f39653876c7dec3e3afd4c2696920e05c83832b9737afc21928f2d2eb7a753 \
--hash=sha256:986fed8bcf79fb82c78b18a53352a0b287a73817d6dbcfba3162da36667c49a0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering... do we need these?

Comment thread test/pylint/BUILD
paths = [
"src",
"test",
"__init__.py",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

name = "pylint",
exclude = [
"**/__pycache__/**",
],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically by default we should analyze only *.py files everywhere, but maybe exclude some particular files and locations.

Comment on lines +63 to +64
if "external" not in tags:
pylint_tags.append("external")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for may I ask?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request test ☑️ Adding or refactoring tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants