mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 16:15:29 +00:00
Improve logging
This commit is contained in:
1 parent
807ff1f56e
commit
ba7943d2ea
2 files changed
+4
-3
No files matched your search
@@ -28,9 +28,7 @@ class Project:
|
||||
log.info(f"Using {len(ignored_patterns)} ignored paths from the explicit project configuration.")
|
||||
log.debug(f"Ignored paths: {ignored_patterns}")
|
||||
if project_config.ignore_all_files_in_gitignore:
|
||||
log.info(f"Parsing all gitignore files in {self.project_root}")
|
||||
gitignore_parser = GitignoreParser(self.project_root)
|
||||
log.info(f"Found {len(gitignore_parser.get_ignore_specs())} gitignore files.")
|
||||
for spec in gitignore_parser.get_ignore_specs():
|
||||
log.debug(f"Adding {len(spec.patterns)} patterns from {spec.file_path} to the ignored paths.")
|
||||
ignored_patterns.extend(spec.patterns)
|
||||
|
||||
@@ -151,8 +151,11 @@ class GitignoreParser:
|
||||
|
||||
:return: List of absolute paths to .gitignore files
|
||||
"""
|
||||
log.info("Looking for .gitignore files in %s", self.repo_root)
|
||||
relative_paths = glob.glob("**/.gitignore", root_dir=self.repo_root, recursive=True)
|
||||
return [os.path.join(self.repo_root, rel_path) for rel_path in relative_paths]
|
||||
result = [os.path.join(self.repo_root, rel_path) for rel_path in relative_paths]
|
||||
log.info("Found %s .gitignore files", len(result))
|
||||
return result
|
||||
|
||||
def _create_ignore_spec(self, gitignore_file_path: str) -> GitignoreSpec:
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user