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

rubocop: init at 0.47.0 #21934

Merged
merged 1 commit into from Jan 17, 2017
Merged

rubocop: init at 0.47.0 #21934

merged 1 commit into from Jan 17, 2017

Conversation

leemeichin
Copy link
Member

@leemeichin leemeichin commented Jan 16, 2017

Motivation for this change

To add the rubocop linter as a global package (for support with text editors that don't know how to use bundler or docker or nix-shell)

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@leemachin, thanks for your PR! By analyzing the history of the files in this pull request, we identified @zimbatm, @zraexy and @edolstra to be potential reviewers.

Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

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

Just two observations. It's looking good overall.


bundlerEnv rec {
name = "rubocop-${version}";
version = "0.47.0";
Copy link
Member

Choose a reason for hiding this comment

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

Instead of this it's also possible to use pname = "rubocop";. This will automatically extract the version from the gemset.nix and hide any bin that are not part of the main "rubocop" package.


gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
Copy link
Member

Choose a reason for hiding this comment

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

There is a new option called gemdir = ./.; that can be used to automatically infer all these files.

Copy link
Member

Choose a reason for hiding this comment

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

@zimbatm how about throwing a deprecation message for the old variant?

Copy link
Member Author

Choose a reason for hiding this comment

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

@Mic92 @zimbatm I can make a separate PR for that if it makes sense. I suspect there will be quite a lot of deprecation warnings to start with, though.

@leemeichin
Copy link
Member Author

👍 thanks @zimbatm! Will make life easier for future packages I might need to build :)

Use gemdir and pname as suggested by @zimbatm

Fix silly typo
@zimbatm zimbatm merged commit 3e86a0b into NixOS:master Jan 17, 2017
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

5 participants