Skip to content

Commit

Permalink
Merge pull request #400 from martin-belanger/speed-up-pylint
Browse files Browse the repository at this point in the history
test: Speed up pylint
  • Loading branch information
martin-belanger authored Nov 6, 2023
2 parents 71f8011 + 24e9917 commit cff000d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ endforeach
#===========================================================================
# Make a list of modules to lint
modules_to_lint = [stafd, stafctl, stacd, stacctl, stasadm]
packages_to_lint = []


# Point Python Path to Current Build Dir.
Expand Down
11 changes: 1 addition & 10 deletions staslib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,4 @@ python3.install_sources(
subdir: 'staslib',
)

#===============================================================================
# Make a list of modules to lint
skip = ['stafd.idl', 'stacd.idl']
foreach file: files_to_install
fname = fs.name('@0@'.format(file))
if fname not in skip
modules_to_lint += file
endif
endforeach

packages_to_lint += meson.current_build_dir()
2 changes: 1 addition & 1 deletion test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ else
rcfile = srce_dir / 'pylint.rc'

if pylint.found()
test('pylint', pylint, args: ['--rcfile=' + rcfile] + modules_to_lint, env: test_env)
test('pylint', pylint, args: ['--rcfile=' + rcfile] + modules_to_lint + packages_to_lint, env: test_env)
else
warning('Skiping some of the tests because "pylint" is missing.')
endif
Expand Down
2 changes: 1 addition & 1 deletion test/pylint.rc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ignored-modules=
# 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=1
jobs=0

# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
Expand Down

0 comments on commit cff000d

Please sign in to comment.