From 246274301e34a153763c61998277e18cf89c3850 Mon Sep 17 00:00:00 2001 From: Agrim Mittal Date: Fri, 31 Mar 2017 00:03:49 +0530 Subject: [PATCH] update haml-lint.yml --- .haml-lint.yml | 113 ----------------- .haml-lint_todo.yml | 294 +++++++++++++++++++++++++++++++++++--------- 2 files changed, 238 insertions(+), 169 deletions(-) diff --git a/.haml-lint.yml b/.haml-lint.yml index efe05f00..013b144f 100644 --- a/.haml-lint.yml +++ b/.haml-lint.yml @@ -1,114 +1 @@ inherits_from: .haml-lint_todo.yml - -linters: - AlignmentTabs: - enabled: true - - AltText: - enabled: true - - ClassAttributeWithStaticValue: - enabled: true - - ClassesBeforeIds: - enabled: true - - ConsecutiveComments: - enabled: true - - ConsecutiveSilentScripts: - enabled: true - max_consecutive: 2 - - EmptyObjectReference: - enabled: true - - EmptyScript: - enabled: true - - FinalNewline: - enabled: true - present: true - - HtmlAttributes: - enabled: true - - IdNames: - enabled: true - style: lisp_case - - ImplicitDiv: - enabled: true - - InstanceVariables: - enabled: false - - LeadingCommentSpace: - enabled: true - - LineLength: - enabled: true - max: 500 - - MultilinePipe: - enabled: true - - MultilineScript: - enabled: true - - ObjectReferenceAttributes: - enabled: true - - RepeatedId: - enabled: true - severity: error - - RuboCop: - enabled: true - # These cops are incredibly noisy when it comes to HAML templates, so we - # ignore them. - ignored_cops: - - Lint/BlockAlignment - - Lint/EndAlignment - - Lint/Void - - Metrics/BlockLength - - Metrics/LineLength - - Style/AlignParameters - - Style/BlockNesting - - Style/ElseAlignment - - Style/EndOfLine - - Style/FileName - - Style/FinalNewline - - Style/FrozenStringLiteralComment - - Style/IfUnlessModifier - - Style/IndentationWidth - - Style/Next - - Style/TrailingBlankLines - - Style/TrailingWhitespace - - Style/WhileUntilModifier - - RubyComments: - enabled: true - - SpaceBeforeScript: - enabled: true - - SpaceInsideHashAttributes: - enabled: true - style: space - - Indentation: - enabled: true - character: space # or tab - - TagName: - enabled: true - - TrailingWhitespace: - enabled: true - - UnnecessaryInterpolation: - enabled: true - - UnnecessaryStringOutput: - enabled: true diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index f4d4f7db..19e8a46d 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `haml-lint --auto-gen-config` -# on 2017-03-29 13:51:32 +0530 using Haml-Lint version 0.24.0. +# on 2017-03-31 00:02:02 +0530 using Haml-Lint version 0.24.0. # The point is for the user to remove these configuration records # one by one as the lints are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -8,33 +8,239 @@ linters: - # Offense count: 43 - IdNames: + # Offense count: 943 + LineLength: exclude: - - "app/views/admin/comments/index.html.haml" + - "app/views/admin/campaigns/_form.html.haml" + - "app/views/admin/campaigns/index.html.haml" + - "app/views/admin/cfps/_form.html.haml" + - "app/views/admin/cfps/show.html.haml" + - "app/views/admin/comments/_all_comments.html.haml" + - "app/views/admin/comments/_posted_comments.html.haml" + - "app/views/admin/comments/_unread_comments.html.haml" - "app/views/admin/commercials/index.html.haml" + - "app/views/admin/conferences/_campaigns.html.haml" + - "app/views/admin/conferences/_doughnut_chart.html.haml" + - "app/views/admin/conferences/_line_chart.html.haml" + - "app/views/admin/conferences/_recent_registrations.html.haml" + - "app/views/admin/conferences/_recent_submissions.html.haml" + - "app/views/admin/conferences/_recent_users.html.haml" + - "app/views/admin/conferences/_targets.html.haml" + - "app/views/admin/conferences/_todo_list.html.haml" + - "app/views/admin/conferences/_top_submitter.html.haml" + - "app/views/admin/conferences/edit.html.haml" - "app/views/admin/conferences/index.html.haml" + - "app/views/admin/conferences/new.html.haml" - "app/views/admin/conferences/show.html.haml" + - "app/views/admin/contacts/edit.html.haml" + - "app/views/admin/difficulty_levels/_form.html.haml" + - "app/views/admin/difficulty_levels/index.html.haml" + - "app/views/admin/emails/_help.html.haml" + - "app/views/admin/emails/index.html.haml" + - "app/views/admin/event_types/_form.html.haml" + - "app/views/admin/event_types/index.html.haml" + - "app/views/admin/events/_all_events.csv.haml" + - "app/views/admin/events/_all_with_comments.csv.haml" + - "app/views/admin/events/_change_state_dropdown.html.haml" + - "app/views/admin/events/_confirmed_events.csv.haml" + - "app/views/admin/events/_nested_comments.html.haml" - "app/views/admin/events/_proposal.html.haml" + - "app/views/admin/events/_voting.html.haml" + - "app/views/admin/events/_voting_index.html.haml" + - "app/views/admin/events/index.html.haml" + - "app/views/admin/events/registrations.html.haml" - "app/views/admin/events/reports.html.haml" - "app/views/admin/events/show.html.haml" + - "app/views/admin/lodgings/_form.html.haml" + - "app/views/admin/lodgings/index.html.haml" + - "app/views/admin/programs/_form.html.haml" + - "app/views/admin/programs/show.html.haml" + - "app/views/admin/questions/_form.html.haml" + - "app/views/admin/questions/_questions.html.haml" + - "app/views/admin/questions/edit.html.haml" + - "app/views/admin/questions/index.html.haml" + - "app/views/admin/questions/show.html.haml" + - "app/views/admin/registration_periods/_form.html.haml" + - "app/views/admin/registration_periods/show.html.haml" + - "app/views/admin/registrations/edit.html.haml" - "app/views/admin/registrations/index.html.haml" - - "app/views/admin/reports/index.html.haml" + - "app/views/admin/reports/_all_events.html.haml" + - "app/views/admin/reports/_events_with_requirements.html.haml" + - "app/views/admin/reports/_events_without_commercials.html.haml" + - "app/views/admin/reports/_missing_speakers.html.haml" + - "app/views/admin/resources/_form.html.haml" + - "app/views/admin/resources/index.html.haml" + - "app/views/admin/resources/show.html.haml" + - "app/views/admin/roles/_form.html.haml" + - "app/views/admin/roles/_users.html.haml" + - "app/views/admin/roles/index.html.haml" + - "app/views/admin/roles/show.html.haml" + - "app/views/admin/rooms/_form.html.haml" + - "app/views/admin/rooms/index.html.haml" + - "app/views/admin/schedules/_day_tab.html.haml" + - "app/views/admin/schedules/_event.html.haml" + - "app/views/admin/schedules/index.html.haml" + - "app/views/admin/schedules/show.html.haml" + - "app/views/admin/splashpages/_form.html.haml" + - "app/views/admin/splashpages/show.html.haml" + - "app/views/admin/sponsors/_form.html.haml" + - "app/views/admin/sponsors/index.html.haml" + - "app/views/admin/sponsorship_levels/_form.html.haml" + - "app/views/admin/sponsorship_levels/index.html.haml" + - "app/views/admin/targets/_form.html.haml" + - "app/views/admin/targets/index.html.haml" + - "app/views/admin/tickets/_form.html.haml" + - "app/views/admin/tickets/index.html.haml" + - "app/views/admin/tickets/show.html.haml" + - "app/views/admin/tracks/_form.html.haml" + - "app/views/admin/tracks/index.html.haml" + - "app/views/admin/tracks/show.html.haml" + - "app/views/admin/users/_event_registrations.html.haml" + - "app/views/admin/users/_form.html.haml" + - "app/views/admin/users/_submissions.html.haml" + - "app/views/admin/users/index.html.haml" - "app/views/admin/users/show.html.haml" - "app/views/admin/venues/_form.html.haml" + - "app/views/admin/venues/show.html.haml" + - "app/views/admin/versions/_object_desc_and_link.html.haml" + - "app/views/admin/versions/index.html.haml" + - "app/views/admin/volunteers/index.html.haml" + - "app/views/commercials/edit.html.haml" + - "app/views/commercials/new.html.haml" - "app/views/conference_registrations/_form.html.haml" + - "app/views/conference_registrations/_questions.html.haml" + - "app/views/conference_registrations/_registration_info.html.haml" + - "app/views/conference_registrations/_volunteer.html.haml" + - "app/views/conference_registrations/show.html.haml" + - "app/views/conferences/_call_for_paper.html.haml" + - "app/views/conferences/_conference_details.html.haml" + - "app/views/conferences/_gallery.html.haml" + - "app/views/conferences/_lodging.html.haml" + - "app/views/conferences/_program.html.haml" + - "app/views/conferences/_registration.html.haml" + - "app/views/conferences/_schedule_splashpage.html.haml" + - "app/views/conferences/_sponsors.html.haml" + - "app/views/conferences/_tickets.html.haml" - "app/views/conferences/_venue.html.haml" + - "app/views/conferences/_venue_map.html.haml" + - "app/views/conferences/index.html.haml" - "app/views/conferences/show.html.haml" + - "app/views/devise/confirmations/new.html.haml" + - "app/views/devise/ichain_sessions/new.html.haml" + - "app/views/devise/ichain_sessions/new_test.html.haml" + - "app/views/devise/passwords/edit.html.haml" + - "app/views/devise/passwords/new.html.haml" + - "app/views/devise/registrations/_volunteeruser.html.haml" + - "app/views/devise/registrations/edit.html.haml" + - "app/views/devise/registrations/new.html.haml" + - "app/views/devise/sessions/new.html.haml" - "app/views/devise/shared/_help.html.haml" + - "app/views/devise/shared/_links.html.haml" + - "app/views/devise/shared/_openid_links.html.haml" - "app/views/devise/shared/_sign_in_form_embedded.html.haml" + - "app/views/devise/shared/_sign_up_form_embedded.html.haml" + - "app/views/layouts/_admin_sidebar.html.haml" + - "app/views/layouts/_admin_sidebar_index.html.haml" + - "app/views/layouts/_messages.html.haml" - "app/views/layouts/_navigation.html.haml" + - "app/views/layouts/application.html.haml" + - "app/views/payments/_payment.html.haml" - "app/views/proposals/_form.html.haml" - "app/views/proposals/_proposal_form.html.haml" + - "app/views/proposals/_tooltip.html.haml" - "app/views/proposals/index.html.haml" - "app/views/proposals/new.html.haml" + - "app/views/proposals/registrations.html.haml" - "app/views/proposals/show.html.haml" + - "app/views/schedules/_carousel.html.haml" + - "app/views/schedules/_event.html.haml" - "app/views/schedules/_schedule.html.haml" + - "app/views/schedules/_schedule_item.html.haml" + - "app/views/schedules/_schedule_tabs.html.haml" + - "app/views/schedules/events.html.haml" - "app/views/schedules/show.html.haml" + - "app/views/schedules/show.xml.haml" + - "app/views/shared/_changelog_actions.haml" + - "app/views/shared/_dynamic_association.html.haml" + - "app/views/shared/_media_item.html.haml" + - "app/views/shared/_media_items.html.haml" + - "app/views/shared/_object_changes.html.haml" + - "app/views/tickets/_ticket.html.haml" + - "app/views/tickets/index.html.haml" + - "app/views/users/edit.html.haml" + - "app/views/users/show.html.haml" + + # Offense count: 204 + InstanceVariables: + exclude: + - "app/views/admin/campaigns/_form.html.haml" + - "app/views/admin/cfps/_form.html.haml" + - "app/views/admin/conferences/_todo_list.html.haml" + - "app/views/admin/difficulty_levels/_form.html.haml" + - "app/views/admin/event_types/_form.html.haml" + - "app/views/admin/events/_change_state_dropdown.html.haml" + - "app/views/admin/events/_proposal.html.haml" + - "app/views/admin/events/_voting.html.haml" + - "app/views/admin/events/_voting_index.html.haml" + - "app/views/admin/lodgings/_form.html.haml" + - "app/views/admin/questions/_questions.html.haml" + - "app/views/admin/registration_periods/_form.html.haml" + - "app/views/admin/reports/_all_events.html.haml" + - "app/views/admin/reports/_events_with_requirements.html.haml" + - "app/views/admin/reports/_events_without_commercials.html.haml" + - "app/views/admin/reports/_missing_speakers.html.haml" + - "app/views/admin/roles/_form.html.haml" + - "app/views/admin/roles/_users.html.haml" + - "app/views/admin/rooms/_form.html.haml" + - "app/views/admin/schedules/_day_tab.html.haml" + - "app/views/admin/sponsors/_form.html.haml" + - "app/views/admin/sponsorship_levels/_form.html.haml" + - "app/views/admin/tickets/_form.html.haml" + - "app/views/admin/tracks/_form.html.haml" + - "app/views/admin/users/_form.html.haml" + - "app/views/admin/users/_submissions.html.haml" + - "app/views/admin/venues/_form.html.haml" + - "app/views/conference_registrations/_form.html.haml" + - "app/views/conference_registrations/_registration_info.html.haml" + - "app/views/conference_registrations/_volunteer.html.haml" + - "app/views/conferences/_call_for_paper.html.haml" + - "app/views/conferences/_lodging.html.haml" + - "app/views/conferences/_program.html.haml" + - "app/views/conferences/_registration.html.haml" + - "app/views/conferences/_schedule_splashpage.html.haml" + - "app/views/conferences/_sponsors.html.haml" + - "app/views/conferences/_tickets.html.haml" + - "app/views/conferences/_venue.html.haml" + - "app/views/conferences/_venue_map.html.haml" + - "app/views/layouts/_admin_sidebar.html.haml" + - "app/views/layouts/_user_menu.html.haml" + - "app/views/payments/_payment.html.haml" + - "app/views/proposals/_encouragement_text.html.haml" + - "app/views/proposals/_form.html.haml" + - "app/views/proposals/_proposal_form.html.haml" + - "app/views/schedules/_carousel.html.haml" + - "app/views/schedules/_event.html.haml" + - "app/views/schedules/_schedule.html.haml" + - "app/views/schedules/_schedule_item.html.haml" + - "app/views/schedules/_schedule_tabs.html.haml" + + # Offense count: 32 + IdNames: + exclude: + - "app/views/admin/cfps/show.html.haml" + - "app/views/admin/comments/index.html.haml" + - "app/views/admin/conferences/index.html.haml" + - "app/views/admin/conferences/show.html.haml" + - "app/views/admin/difficulty_levels/index.html.haml" + - "app/views/admin/event_types/index.html.haml" + - "app/views/admin/programs/show.html.haml" + - "app/views/admin/questions/show.html.haml" + - "app/views/admin/roles/show.html.haml" + - "app/views/admin/schedules/index.html.haml" + - "app/views/admin/sponsorship_levels/index.html.haml" + - "app/views/admin/users/_event_registrations.html.haml" + - "app/views/admin/users/show.html.haml" + - "app/views/users/edit.html.haml" # Offense count: 8 UnnecessaryInterpolation: @@ -69,53 +275,10 @@ linters: - "app/views/users/edit.html.haml" - "app/views/users/show.html.haml" - # Offense count: 31 - LineLength: - exclude: - - "app/views/admin/conferences/edit.html.haml" - - "app/views/admin/conferences/new.html.haml" - - "app/views/admin/difficulty_levels/_form.html.haml" - - "app/views/admin/emails/index.html.haml" - - "app/views/admin/events/registrations.html.haml" - - "app/views/admin/programs/_form.html.haml" - - "app/views/admin/roles/_users.html.haml" - - "app/views/admin/sponsorship_levels/_form.html.haml" - - "app/views/admin/venues/_form.html.haml" - - "app/views/conference_registrations/_registration_info.html.haml" - - "app/views/conferences/_venue_map.html.haml" - - "app/views/devise/registrations/_volunteeruser.html.haml" - - "app/views/proposals/index.html.haml" - - "app/views/proposals/show.html.haml" - - "app/views/schedules/_carousel.html.haml" - - "app/views/shared/_object_changes.html.haml" - - # Offense count: 27 - ClassesBeforeIds: - exclude: - - "app/views/admin/emails/index.html.haml" - - "app/views/admin/events/reports.html.haml" - - "app/views/admin/events/show.html.haml" - - "app/views/admin/reports/index.html.haml" - - "app/views/admin/users/show.html.haml" - - "app/views/admin/venues/_form.html.haml" - - "app/views/conferences/index.html.haml" - - "app/views/devise/shared/_help.html.haml" - - "app/views/devise/shared/_sign_in_form_embedded.html.haml" - - "app/views/layouts/_navigation.html.haml" - - "app/views/proposals/_form.html.haml" - - # Offense count: 14 - ConsecutiveSilentScripts: - exclude: - - "app/views/admin/events/index.html.haml" - - "app/views/admin/schedules/_day_tab.html.haml" - - "app/views/admin/schedules/_event.html.haml" - - "app/views/admin/versions/_object_desc_and_link.html.haml" - - "app/views/schedules/_carousel.html.haml" - - # Offense count: 264 + # Offense count: 268 SpaceInsideHashAttributes: exclude: + - "app/views/admin/conferences/_todo_list.html.haml" - "app/views/admin/questions/_form.html.haml" - "app/views/admin/questions/index.html.haml" - "app/views/admin/registrations/index.html.haml" @@ -162,6 +325,30 @@ linters: - "app/views/tickets/_ticket.html.haml" - "app/views/tickets/index.html.haml" + # Offense count: 27 + ClassesBeforeIds: + exclude: + - "app/views/admin/emails/index.html.haml" + - "app/views/admin/events/reports.html.haml" + - "app/views/admin/events/show.html.haml" + - "app/views/admin/reports/index.html.haml" + - "app/views/admin/users/show.html.haml" + - "app/views/admin/venues/_form.html.haml" + - "app/views/conferences/index.html.haml" + - "app/views/devise/shared/_help.html.haml" + - "app/views/devise/shared/_sign_in_form_embedded.html.haml" + - "app/views/layouts/_navigation.html.haml" + - "app/views/proposals/_form.html.haml" + + # Offense count: 14 + ConsecutiveSilentScripts: + exclude: + - "app/views/admin/events/index.html.haml" + - "app/views/admin/schedules/_day_tab.html.haml" + - "app/views/admin/schedules/_event.html.haml" + - "app/views/admin/versions/_object_desc_and_link.html.haml" + - "app/views/schedules/_carousel.html.haml" + # Offense count: 2 FinalNewline: exclude: @@ -226,14 +413,9 @@ linters: - "app/views/payments/new.html.haml" - "app/views/tickets/index.html.haml" - # Offense count: 1 - AltText: - exclude: - - "app/views/admin/venues/show.html.haml" - # Offense count: 7 ClassAttributeWithStaticValue: exclude: - "app/views/conferences/_gallery.html.haml" - "app/views/layouts/_navigation.html.haml" - - "app/views/schedules/events.html.haml" \ No newline at end of file + - "app/views/schedules/events.html.haml"