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

Expose multiprocessing to cli args #55

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libsast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__title__ = 'libsast'
__authors__ = 'Ajin Abraham'
__copyright__ = f'Copyright {year} Ajin Abraham, opensecurity.in'
__version__ = '3.1.5'
__version__ = '3.1.6'
__version_info__ = tuple(int(i) for i in __version__.split('.'))
__all__ = [
'Scanner',
Expand Down
7 changes: 7 additions & 0 deletions libsast/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ def main():
help='No of CPU cores to use. Use all cores by default',
type=int,
required=False)
parser.add_argument('-mp', '--multiprocessing',
help=('Multiprocessing strategy to use.'
' Options: default, thread, billiard'),
default='default',
type=str,
required=False)
parser.add_argument('-v', '--version',
help='Show libsast version',
required=False,
Expand All @@ -94,6 +100,7 @@ def main():
'ignore_paths': args.ignore_paths,
'show_progress': args.show_progress,
'cpu_core': args.cpu_core,
'multiprocessing': args.multiprocessing,
}
result = Scanner(options, args.path).scan()
output(args.output, result)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "libsast"
version = "3.1.5"
version = "3.1.6"
description = "A generic SAST library built on top of semgrep and regex"
keywords = ["libsast", "SAST", "Python SAST", "SAST API", "Regex SAST", "Pattern Matcher"]
authors = ["Ajin Abraham <[email protected]>"]
Expand Down
Loading