Skip to content

Commit

Permalink
Dev: add pylint to check ill-formated string literals
Browse files Browse the repository at this point in the history
This pull request added pylint with a minimal configuration, enabling
only string checks.

See ClusterLabs#1601.
  • Loading branch information
nicholasyang2022 committed Nov 4, 2024
1 parent 4972fad commit fe7f066
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/crmsh-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
echo "Please run ./update-data-manifest.sh && git add ./data-manifest in your local environment and push the code again."
exit 1
}
sudo apt-get update && sudo apt-get install pylint
pylint --rcfile pylint.toml crmsh
unit_test:
runs-on: ubuntu-24.04
Expand Down
23 changes: 23 additions & 0 deletions pylint.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tool.pylint.main]
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs = 0

[tool.pylint."messages control"]
# Disable the message, report, category or checker with the given id(s). You can
# either give multiple identifiers separated by comma (,) or put this option
# multiple times (only on the command line, not in the configuration file where
# it should appear only once). You can also use "--disable=all" to disable
# everything first and then re-enable specific checks. For example, if you want
# to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable = ["all"]

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where it
# should appear only once). See also the "--disable" option for examples.
enable = ["string"]

0 comments on commit fe7f066

Please sign in to comment.