--stdinapart from the end of
stdout? I'm having trouble splitting the string between the report and the corrections, due to
====================followed by a newline being different based on the OS and, seemingly, editor settings
Rubocop keeps warning me about a decimal number:
Vagrantfile:36:58: C: Style/NumericLiterals: Use underscores(_) as decimal mark and separate every 3 digits with them.
config.vm.network :forwarded_port, guest: 27017, host: 27017 # mongodb
But its actually a port in Vagranfile setup. Is there any way to override this setup not to identify ports as decimal numbers ?
In order to test, I made something like this:
config.vm.network :forwarded_port, guest: 270_17, host: 270_17 # mongodb
And Rubucop identify as a valid setup, returning no offenses detected
Hello rubofriends. Is there a way to disable an entire family/group/namespace of cops for a particular set of files?
For example, in my project, I want to disable all "Metrics" cops for my tests, but keep them enabled for all other code. I could just disable each Metrics cop for the test files as the violations pop up, but I want to see if this functionality already exists or requires a new feature.
Okay, the correct term was "department", according to the documentation. So, the "Metrics" department.
Also, I think I just discovered that it is indeed already existing, I was able to just use
Metrics:... in my YAML and it worked. Still, not entirely sure if this is the correct approach because I can't find this case mentioned in the docs.
The think is that we want to write it like
def file_params params .require(:file) .permit( :description, :user_id, :content_type, :created_at, :updated_at, :unit_id, :document_id, :document_type, :sort_id, :is_deleted ) end
I know I could write it on one line but we want to have it like this.
In generall we think to 10 lines method like is good. For some controllers we have more then 10 parameters and need more then 10 lines.
Is there a possibility of generalizing the autocorrect capability into a code rewrite gem?