Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/ctags.py
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | "tools": { | ||||
"command_line": """ctags --fields=+lnz --sort=no --links=no """ | "command_line": """ctags --fields=+lnz --sort=no --links=no """ | ||||
"""--output-format=json <filepath>""" | """--output-format=json <filepath>""" | ||||
}, | }, | ||||
}, | }, | ||||
"languages": {}, | "languages": {}, | ||||
} | } | ||||
class CtagsIndexer(ContentIndexer): | class CtagsIndexer(ContentIndexer[Dict]): | ||||
def __init__(self, *args, **kwargs): | def __init__(self, *args, **kwargs): | ||||
super().__init__(*args, **kwargs) | super().__init__(*args, **kwargs) | ||||
self.config = merge_configs(DEFAULT_CONFIG, self.config) | self.config = merge_configs(DEFAULT_CONFIG, self.config) | ||||
self.working_directory = self.config["workdir"] | self.working_directory = self.config["workdir"] | ||||
self.language_map = self.config["languages"] | self.language_map = self.config["languages"] | ||||
def filter(self, ids): | def filter(self, ids): | ||||
"""Filter out known sha1s and return only missing ones. | """Filter out known sha1s and return only missing ones. | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |