Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting automatically adds changes incompatible with Prettier #2616

Closed
fasterius opened this issue Dec 20, 2023 · 2 comments
Closed

Linting automatically adds changes incompatible with Prettier #2616

fasterius opened this issue Dec 20, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@fasterius
Copy link

fasterius commented Dec 20, 2023

Description of the bug

When running linting with the latest version of nf-core tools (2.11) it automatically changes the formatting in modules.json - changes that Prettier (version 3.1.1, the latest) fails - this is not the case with version 2.10. This is an example of the changes introduced with nf-core lint:

[...]
"fastqc": {
    "branch": "master",
    "git_sha": "65ad3e0b9a4099592e1102e92e10455dc661cf53",
    "installed_by": [
        "modules"
    ]
}
[...]

The relevant lines are the three with the intalled_by setting; Prettier wants this to be "installed_by": ["modules"], i.e. on a single line.

I was under the impression that linting wouldn't write any changes unless the --fix flag was also supplied? I tried to see where this was changed, but all I could find was a PR for sorting the modules list (https://github.com/nf-core/tools/pull/2570/files). Not too familiar with the nf-core tools code, so not sure if that's it or something else.

Command used and terminal output

$ git clone [email protected]:nf-core/spatialtranscriptomics.git
$ cd spatialtranscriptomics
$ nf-core lint
$ git diff

This problem persists for e.g. the nf-core/rnaseq/ pipeline as well - I checked just to make sure it wasn't just the pipeline I was working on.

System information

Nextflow: 23.04.4.5881
Hardware: MacBook Pro 2023
Executor: local
OS: MacOS
Version of nf-core/tools: 2.11
Python version: 3.12.1

@fasterius fasterius added the bug Something isn't working label Dec 20, 2023
@mirpedrol
Copy link
Member

Thanks for reporting :) This is now fixed with v2.11.1

@fasterius
Copy link
Author

Wow, that was quick! It does indeed work now, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants