Open ResistantBear opened 5 months ago
May focus on: C, Dart, Erlang, Fortran, Haskell, Julia, Json + yaml (vermutlich erst eigene metriken nötig), Perl, Ruby, Rust, R, Scala, Svelte, Vue, bash
Updated order: Vue, Json yaml, Perl, C, bash, rust
I would like to also support Markdown files please.
Metric gardener should be able accept files of all/ languages for which there are tree-sitter grammars available, not only the officially supported and unit-tested languages, even if these languages might not work correctly with metric gardener.
Users should not be required to install grammars, so we should include all known grammars even if we do not yet support the language. That would be a good option as long as the individual language grammars are not too huge. Otherwise, we might only include grammars for the more common languages and make it easy for the user to make other grammars work as well.
Tasks:
[ ] Add some other tree sitter grammars to package.json, install them via npm install.
[ ] Add the names, abbreviations and file extension for the source code files of the added languages to src/parser/helper/Languages.ts
[ ] Add the paths to the node-types.json of the added languages to src/commands/import-grammars/ImportNodeTypes.ts
[ ] Import all statements of these grammars using the new import script (#43) with npm run start --import-grammars
[ ] Check if everything still works for the supported languages (npm test)
[ ] May test the program with source code of some of the added languages
[ ] Add all other available tree sitter grammars to package.json, install them via npm install
[ ] Check the size of the project if the installation of all these grammars leads to a still acceptable size of the project
[ ] Regardless of the size of the project: Import all statements of these grammars using the new import script (#43) with npm run start --import-grammars
[ ] Check if everything still works for the supported languages (npm test) and that there is no tremendous slowdown because of the now larger nodeTypesConfig.json
[ ] If the size of the project is unacceptable: Remove grammars for less common languages from package.json until the size is acceptable again. Otherwise, all is fine.
[ ] If there is no significant slowdown after importing all grammars: Commit the new nodeTypesConfig.json. Even if we do not install all grammars by default, the user can just install the grammar he wants and does not have to run the import script himself.
[ ] If there is a significant slowdown: Create the nodeTypesConfig.json only for the most common languages. If the user wants to use another language, he has to install the grammar and run the import script himself. Provide a good documentation for the user on how to do so.