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

[staging] treewide: remove trailing spaces #109911

Closed
wants to merge 2 commits into from

Conversation

jonringer
Copy link
Contributor

Motivation for this change

Just ran

find . -name '*.nix' -exec sed -i -e 's|\s*$||g' {} +

targeting staging as I may be editing blocks of code

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -1445,7 +1445,7 @@ self: {
license = stdenv.lib.licenses.bsd3;
hydraPlatforms = stdenv.lib.platforms.none;
broken = true;
}) {inherit (pkgs) db; inherit (pkgs) dbxml;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is generated automatically and would have to be fixed in https://github.com/NixOS/cabal2nix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's fine if it gets overwritten, this is just to avoid the situation where CI will block on minor linting issues

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is ignored by the editorconfig check.

nixpkgs/.editorconfig

Lines 91 to 93 in 3ffc05e

[pkgs/development/haskell-modules/hackage-packages.nix]
indent_style = unset
trim_trailing_whitespace = unset

@jonringer
Copy link
Contributor Author

jonringer commented Jan 19, 2021

EDIT: wrong PR

@siraben
Copy link
Member

siraben commented Jan 19, 2021

Isn't there code/tests that deliberately need trailing whitespace as well? I did a similar treewide PR and recall that.

Edit: that file is nixos/tests/systemd-networkd-vrf.nix

Copy link
Member

@siraben siraben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed all files, looks good though you might want to indent an installPhase.

}
";
installPhase = ''
mkdir -p $out/share/dictd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend indenting installPhase body by a few spaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was messed up from before, I just want the CI to pass

@zowoq
Copy link
Contributor

zowoq commented Jan 19, 2021

The eggs.nix files are autogenerated and pkgs/build-support/upstream-updater/** has lots of whitespace errors so they are both ignored in .editorconfig.

@jonringer
Copy link
Contributor Author

I'm not trying to solve all the whitespace issues, if a few autogenerated files will recreate whitespace issues, I'm okay with this. I just feel bad when people doing version bumps get linting errors for stuff that's not related to their PR.

@zowoq
Copy link
Contributor

zowoq commented Jan 19, 2021

I'm not trying to solve all the whitespace issues, if a few autogenerated files will recreate whitespace issues

You don't need to solve anything as they don't cause any errors, they can be dropped from this PR.

@jonringer
Copy link
Contributor Author

looks like there's quite a few conflicts, I'm going to close this

@jonringer jonringer closed this Jan 19, 2021
@jonringer jonringer deleted the remove-whitespace branch January 19, 2021 16:17
@zowoq
Copy link
Contributor

zowoq commented Jan 19, 2021

@jonringer I've picked up some of these changes in #110028.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants