ament / ament/ament_lint

Enable custom uncrustify configuration with ament_lint_auto

Aberta
#308 2 comentários 0 reações 0 responsáveis Ver no GitHub
enhancement help wanted
Linguagem predominante
Python
Estrelas
50
Forks
129
Merge médio
3d 10h
PRs com merge (30d)
3

Descrição

# Problem

I failed to use a custom configuration for uncrustify when using it from ament_lint_auto:
* There seems to be no possibility to pass a custom configuration file directly via an argument to ament_lint_auto.
* Disabling uncrustify from ament_lint_auto by `set(ament_cmake_uncrustify_FOUND TRUE)` works as usual ,but when invoking `ament_uncrustify` explicitly (with our without a different test-name), it is actually invoked **two times**, once with the custom configuration and once with the default configuration.

I tried various modifications of the following snippet. All either ended up in uncrustify being not invoked at all or being invoked two times, as just described:

```
if(BUILD_TESTING)
find_package(ament_cmake_uncrustify REQUIRED)
ament_uncrustify(CONFIG_FILE "./code_style.cfg" TESTNAME "custom_uncrustify")

find_package(ament_lint_auto REQUIRED)
set(ament_cmake_uncrustify_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
```

# Desired behavior

Uncrustify should be invoked only once.
* Either provide a possibility to pass the path to the custom configuration file via an environment variable
* or even auto-discover the presence of a custom configuration file in the root of the repo or package.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.