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

.editorconfig: various #88431

Merged
merged 1 commit into from May 30, 2020
Merged

.editorconfig: various #88431

merged 1 commit into from May 30, 2020

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented May 20, 2020

Draft until we decide to keep the editorconfig CI check.

@@ -34,3 +34,9 @@ indent_size = 2
# Match perl/python/shell scripts, set indent width of four
[*.{pl,py,sh}]
indent_size = 4

# Disable for auto-generated hackage2nix file
[pkgs/development/haskell-modules/hackage-packages.nix]
Copy link
Member

Choose a reason for hiding this comment

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

While you are at it, maybe also check if we need to add pkgs/development/node-packages/node-packages-v*.nix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apart from not having final newlines they seem fine.

Some of the generated json files (node-packages-*.json, recipes-archive-melpa.json) will probably need to be excluded if we end up adding json.

Copy link
Contributor Author

@zowoq zowoq May 22, 2020

Choose a reason for hiding this comment

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

Added node-packages-v*.nix and gemset.nix (#88564).

I guess we're probably going to end up doing this for a lot of the generated files.

@zowoq
Copy link
Contributor Author

zowoq commented May 20, 2020

@Mic92 There is about 50 *.upstream files scattered around the repo, are they still in use or could they be removed?

I'm going through the repo by file type and size now looking for other outliers.

@Mic92
Copy link
Member

Mic92 commented May 20, 2020

I think mainly @7c6f434c uses them. I don't know what tool he uses it for.
I personally just use https://github.com/Mic92/nix-update/ which does not need extra meta information.

@zowoq
Copy link
Contributor Author

zowoq commented May 20, 2020

I personally just use https://github.com/Mic92/nix-update/ ...

I've been using as well. What do you think about adding it here? I send a PR it if you agree?

@Mic92
Copy link
Member

Mic92 commented May 20, 2020

I personally just use Mic92/nix-update ...

I've been using as well. What do you think about adding it here? I send a PR it if you agree?

Feel free to add it with me as a maintainer.

@7c6f434c
Copy link
Member

.upstream files are usable with update-walker script which is inside Nixpkgs, and I do not always get around to updating based on them (but sometimes use them for updating).

@zowoq zowoq mentioned this pull request May 22, 2020
10 tasks
@zowoq zowoq closed this May 22, 2020
@zowoq zowoq deleted the editorconfig-fixes branch May 22, 2020 13:46
@Mic92
Copy link
Member

Mic92 commented May 22, 2020

I think we can still merge this one.
It does not depend on the github ci check.

@zowoq zowoq restored the editorconfig-fixes branch May 22, 2020 14:53
@zowoq
Copy link
Contributor Author

zowoq commented May 22, 2020

I guess we should still try and get all of generated files listed and add some of the more common file types.

insert_final_newline = unset

# Disable for auto-generated perl-packages file
[pkgs/top-level/perl-packages.nix]
Copy link
Member

Choose a reason for hiding this comment

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

Some of the stuff might be automatic. Some of it is manual. But there might be a lot of errors still though given its size.

add Gemfile, .json, .lock, .md, .pm

disable for some files or file types that are auto-generated
or require significant changes
@zowoq
Copy link
Contributor Author

zowoq commented May 29, 2020

I wanted to set a treewide default and require that files opt-out but there are too many miscellaneous files checked in for a default to be enforced without it becoming tedious.

@zowoq zowoq marked this pull request as ready for review May 29, 2020 23:47
@Mic92 Mic92 merged commit 19d44fc into NixOS:master May 30, 2020
@zowoq zowoq deleted the editorconfig-fixes branch May 30, 2020 10:48
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

3 participants