Skip to content

Commit ac2cca3

Browse files
committed
adding default ignore patterns for more languages: C / C++ / Java / Swift / Ruby / Rust / Go / C#
1 parent 38f59ba commit ac2cca3

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

src/gitingest/parse_query.py

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import uuid
33
import os
44

5-
65
DEFAULT_IGNORE_PATTERNS = [
76
# Python
87
'*.pyc', '*.pyo', '*.pyd', '__pycache__', '.pytest_cache', '.coverage',
@@ -12,6 +11,37 @@
1211
# JavaScript/Node
1312
'node_modules', 'bower_components', 'package-lock.json', 'yarn.lock',
1413
'.npm', '.yarn', '.pnpm-store',
14+
15+
# Java
16+
'*.class', '*.jar', '*.war', '*.ear', '*.nar',
17+
'target/', '.gradle/', 'build/',
18+
'.settings/', '.project', '.classpath',
19+
'gradle-app.setting', '*.gradle',
20+
21+
# C/C++
22+
'*.o', '*.obj', '*.so', '*.dll', '*.dylib', '*.exe', '*.lib', '*.out', '*.a', '*.pdb',
23+
24+
# Swift/Xcode
25+
'.build/', '*.xcodeproj/', '*.xcworkspace/',
26+
'*.pbxuser', '*.mode1v3', '*.mode2v3',
27+
'*.perspectivev3', '*.xcuserstate',
28+
'xcuserdata/', '.swiftpm/',
29+
30+
# Ruby
31+
'*.gem', '.bundle/', 'vendor/bundle',
32+
'Gemfile.lock', '.ruby-version',
33+
'.ruby-gemset', '.rvmrc',
34+
35+
# Rust
36+
'target/', 'Cargo.lock', '**/*.rs.bk',
37+
38+
# Go
39+
'bin/', 'pkg/',
40+
41+
# .NET/C#
42+
'bin/', 'obj/', '*.suo', '*.user',
43+
'*.userosscache', '*.sln.docstates',
44+
'packages/', '*.nupkg',
1545

1646
# Version control
1747
'.git', '.svn', '.hg', '.gitignore', '.gitattributes', '.gitmodules',
@@ -33,9 +63,7 @@
3363
'.DS_Store', 'Thumbs.db', 'desktop.ini',
3464

3565
# Build directories and artifacts
36-
'build', 'dist', 'target', 'out',
37-
'*.egg-info', '*.egg', '*.whl',
38-
'*.so', '*.dylib', '*.dll', '*.class',
66+
'dist', '*.egg-info', '*.egg', '*.whl',
3967

4068
# Documentation
4169
'site-packages', '.docusaurus', '.next', '.nuxt',
@@ -47,6 +75,7 @@
4775
'vendor/', # Dependencies in various languages
4876
]
4977

78+
5079
TMP_BASE_PATH = "../tmp"
5180

5281
def parse_url(url: str) -> dict:

0 commit comments

Comments
 (0)