ament / ament/ament_lint

Duplicate functions across ament linters with different functionality

Aperta
#157 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
50
Fork
129
Merge medio
3g 10h
PR unite (30g)
3

Descrizione

Many of the linters (`clang-format`, `cppcheck`, `cpplint`, `flake8`, `pep257`, etc.) utilize identically named functions (`get_xunit_content`, `get_files`, and `find_executable`) which all express a similar but slightly different functionality based on the linter being used.

### Core Functionality of Identically-Named Functions
Note: Given this issue, some of the received arguments may vary between linters
1. `get_xunit_content`

- Receive a report consisting of logging data, a test name, and an elapsed time
- Log to an `.xml` file

2. `get_files`
- Receive the paths to consider and the desired file extensions
- Return the valid files

3. `find_executable`
- Receive a file name indicating the desired executable and additional specified paths (default is None)
- Search PATH and additional paths for the executable

These functions could likely be unified and condensed.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.