mirror of
https://github.com/kevinveenbirkenbach/directory-content-scanner.git
synced 2024-11-23 21:31:04 +01:00
Added logic to remove bash and shell comments
This commit is contained in:
parent
c950a42ca9
commit
095701e304
8
scan.py
8
scan.py
@ -9,6 +9,8 @@ class CodeProcessor:
|
||||
C = ".c"
|
||||
CPP = ".cpp"
|
||||
H = ".h"
|
||||
BASH = ".sh"
|
||||
SHELL = ".bash"
|
||||
|
||||
@staticmethod
|
||||
def remove_comments(content, file_type):
|
||||
@ -34,6 +36,12 @@ class CodeProcessor:
|
||||
CodeProcessor.H: [
|
||||
(r'\s*//.*', '',0),
|
||||
(r'/\*.*?\*/', '',0)
|
||||
],
|
||||
CodeProcessor.BASH: [
|
||||
(r'\s*#.*', '', 0)
|
||||
],
|
||||
CodeProcessor.SHELL: [
|
||||
(r'\s*#.*', '', 0)
|
||||
]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user