Skip to content

Commit

Permalink
ignore files added
Browse files Browse the repository at this point in the history
  • Loading branch information
diogoocruz committed Apr 4, 2024
1 parent 32de1c1 commit d0d0705
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion burocrata/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ def main(extension, check, verbose, directories):
reporter.error(config_file.read_text())
sys.exit(1)
notice = config["tool"]["burocrata"]["notice"].split("\n")


#########
if "exclude" in config["tool"]["burocrata"]:
exclude = config["tool"]["burocrata"]["exclude"]
exclude = pathspec.PathSpec.from_lines("gitwildmatch", exclude)
########

gitignore = get_gitignore()

missing_notice = []
Expand All @@ -88,6 +94,8 @@ def main(extension, check, verbose, directories):
for path in directory.glob(f"**/*.{ext}"):
if gitignore.match_file(path):
continue
if exclude.match_file(path):
continue
amount += 1
source_code = path.read_text().split("\n")
if not source_code:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ notice = '''
# Distributed under the terms of the MIT License.
# SPDX-License-Identifier: MIT
# This code is part of the Fatiando a Terra project (https://www.fatiando.org).'''
exclude=[]

0 comments on commit d0d0705

Please sign in to comment.