galaxyproject / galaxyproject/planemo

catch incomplete macros with planemo lint

Open
#879 1 comment 0 reactions 0 assignees View on GitHub
enhancement linting
Dominant language
Python
Stars
110
Forks
102
Avg merge
4d 21h
Merged PRs (30d)
13

Description

It is possible to have errors in Galaxy XML macro usage which functional tests will miss, particularly if the macro is only used in the human facing interface (tool help text, parameter help text, etc).

e.g. https://github.com/peterjc/galaxy_blast/commit/dcff08d98b7cc6ce72eb36dcb19b0cdf3b07cf34

In the above fix, I had two partial macros in my tool's RST help text:

```
@CLI_OPTIONS
```

These should have been:

```
@CLI_OPTIONS@
```

There could be false positives, but if planemo lint built up a list of all the macro names, it would know ``@CLI_OPTIONS@`` was valid, while ``@CLI_OPTIONS\s`` or ``\sCLI_OPTIONS@`` (where ``\s`` is the Python regex for any whitespace) should be reported, either as a warning, or arguably as an error?

More complicated examples might look for non-letters as well as white space, e.g. ``@CLI_OPTIONS>`` or ``"CLI_OPTIONS@`` would like be an error too.

Related to this ``@UNKNOWN@`` could be a missing macro and worth at least a warning?

P.S. If anyone else has come across similar errors, I'd like to see more examples - it would help justify spending time on this enhancement which might otherwise be rarely needed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.