Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Formatting multiline comments keeps adding spaces #232

Closed
SuperSandro2000 opened this issue Mar 6, 2021 · 4 comments · Fixed by #233
Closed

Formatting multiline comments keeps adding spaces #232

SuperSandro2000 opened this issue Mar 6, 2021 · 4 comments · Fixed by #233
Assignees
Labels
bug Something isn't working

Comments

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Mar 6, 2021

Describe the bug
Some multiline comments keep adding spaces when reformatting.

To Reproduce
Steps to reproduce the behavior:

  1. Run nixpkgs-fmt on lib/generatos.nix in nixpkgs (NixOS/nixpkgs@a43e629#diff-56d5f4426e78a9b4d1d89abbfe85a6196ea411b7eaddfc51a677e1e4e55c1e91)
  2. Repeat that and watch line 213 and 214.

Expected behavior
It does not add new spaces every run.

System information

  • nixpkgs-fmt 1.1.0

Additional context
@Kiwi NixOS/nixpkgs@a43e629#diff-56d5f4426e78a9b4d1d89abbfe85a6196ea411b7eaddfc51a677e1e4e55c1e91

@SuperSandro2000 SuperSandro2000 added bug Something isn't working needs triage labels Mar 6, 2021
@zimbatm
Copy link
Member

zimbatm commented Mar 6, 2021

not sure if it's related but this is also an issue: https://github.com/Kiwi/lol-nix-formatter/blob/master/apache.nix

@Kiwi
Copy link
Member

Kiwi commented Mar 6, 2021

kiwi@mvp-nixos nixpkgs [idempot-not]$ git show HEAD --name-only
commit 2cf58fb5bad385190a2ebcf293953f24ec7142f9 (HEAD -> idempot-not, origin/idempot-not)
Author: Robert Djubek <[email protected]>
Date:   Sat Mar 6 12:52:52 2021 +0000

    find . -name "*.nix" -exec nixpkgs-fmt {} +

lib/attrsets.nix
lib/default.nix
lib/generators.nix
maintainers/scripts/eval-release.nix
nixos/modules/services/mail/roundcube.nix
nixos/modules/system/boot/systemd-nspawn.nix
pkgs/build-support/build-maven.nix
pkgs/build-support/emacs/melpa.nix
kiwi@mvp-nixos nixpkgs [idempot-not]$

https://github.com/Kiwi/nixpkgs/tree/idempot-not

@happysalada
Copy link

I have a regression of that bug it seems
https://github.com/NixOS/nixpkgs/pull/129392/files
Running nixpkgs-fmt on the files of the PR will add spaces on multiline comments

@happysalada
Copy link

I think @zimbatm opened a separate issue for that #254
After he took a look, it seems to be a different issue

@Mic92 Mic92 closed this as completed Jul 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants