-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Performance issues with custom configuration #11010
Comments
mockdeep
added a commit
to mockdeep/haml-lint
that referenced
this issue
Sep 25, 2022
**What** This adds support for specifying custom RuboCop configuration files via `.haml-lint.yml`. Users can now add a `config_file:` option with the path to a custom RuboCop configuration to be used when running `haml-lint`. **Why** Having the ability to specify a custom configuration file for RuboCop for our haml views is valuable, but handling this via environment variables can be a challenge. It requires collaborators to add the env variable to their system, or use a tool like [direnv][de]. On the other hand, configuring in `.haml-lint.yml` or friends works out of the box without needing any additional setup. **Notes** A caveat of using a custom RuboCop configuration is that there appears to be [a bit of a performance hit][ph] when using them. Hopefully this will be resolved at some point on the RuboCop side. [de]: https://direnv.net/ [ph]: rubocop/rubocop#11010
sds
pushed a commit
to sds/haml-lint
that referenced
this issue
Sep 27, 2022
**What** This adds support for specifying custom RuboCop configuration files via `.haml-lint.yml`. Users can now add a `config_file:` option with the path to a custom RuboCop configuration to be used when running `haml-lint`. **Why** Having the ability to specify a custom configuration file for RuboCop for our haml views is valuable, but handling this via environment variables can be a challenge. It requires collaborators to add the env variable to their system, or use a tool like [direnv][de]. On the other hand, configuring in `.haml-lint.yml` or friends works out of the box without needing any additional setup. **Notes** A caveat of using a custom RuboCop configuration is that there appears to be [a bit of a performance hit][ph] when using them. Hopefully this will be resolved at some point on the RuboCop side. [de]: https://direnv.net/ [ph]: rubocop/rubocop#11010
MegaDev007
added a commit
to MegaDev007/haml-lint
that referenced
this issue
Aug 3, 2024
**What** This adds support for specifying custom RuboCop configuration files via `.haml-lint.yml`. Users can now add a `config_file:` option with the path to a custom RuboCop configuration to be used when running `haml-lint`. **Why** Having the ability to specify a custom configuration file for RuboCop for our haml views is valuable, but handling this via environment variables can be a challenge. It requires collaborators to add the env variable to their system, or use a tool like [direnv][de]. On the other hand, configuring in `.haml-lint.yml` or friends works out of the box without needing any additional setup. **Notes** A caveat of using a custom RuboCop configuration is that there appears to be [a bit of a performance hit][ph] when using them. Hopefully this will be resolved at some point on the RuboCop side. [de]: https://direnv.net/ [ph]: rubocop/rubocop#11010
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When passing a custom configuration option to RuboCop via the programmatic API (a la haml-lint) it is significantly slower than using the default configuration.
Expected behavior
There should be no performance difference when passing a custom configuration.
Actual behavior
It takes about twice as long.
Steps to reproduce the problem
There's probably a better way, but I ran into this with
haml-lint
when specifying a customHAML_LINT_RUBOCOP_CONF
. It looks like if you call out to RuboCop in a loop with a--config
option it triggers this issue. We happen to have an unrelated warning caused by our.rubocop.yml
, and one thing I'm noticing is that the warning gets output a single time when using the default.rubocop.yml
but a bunch of times when using a custom configuration. So maybe it is reloading the configuration every time?RuboCop version
The text was updated successfully, but these errors were encountered: