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

file_header rule breaks rules table #1002

Closed
marcelofabri opened this issue Dec 18, 2016 · 1 comment
Closed

file_header rule breaks rules table #1002

marcelofabri opened this issue Dec 18, 2016 · 1 comment
Labels
bug Unexpected and reproducible misbehavior.

Comments

@marcelofabri
Copy link
Collaborator

marcelofabri commented Dec 18, 2016

I don't think SwifyTextTable handles truncation, so maybe we should just say if there's a value instead of listing it? Also, the current implementation prints Optional(...).

+-----------------------------------------+--------+-------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| identifier                              | opt-in | correctable | enabled in your config | configuration                                                                                                                                                                                                                                                                                       |
+-----------------------------------------+--------+-------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| attributes                              | yes    | no          | yes                    | warning, always_on_same_line: ["@IBAction", "@NSManaged"], always_on_line_above: []                                                                                                                                                                                                                 |
| closing_brace                           | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| closure_parameter_position              | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| closure_spacing                         | yes    | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| colon                                   | no     | yes         | yes                    | warning, flexible_right_spacing: false                                                                                                                                                                                                                                                              |
| comma                                   | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| conditional_returns_on_newline          | yes    | no          | no                     | N/A                                                                                                                                                                                                                                                                                                 |
| control_statement                       | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| custom_rules                            | no     | no          | yes                    | user-defined                                                                                                                                                                                                                                                                                        |
| cyclomatic_complexity                   | no     | no          | yes                    | warning: 10, error: 20                                                                                                                                                                                                                                                                              |
| dynamic_inline                          | no     | no          | yes                    | error                                                                                                                                                                                                                                                                                               |
| empty_count                             | yes    | no          | yes                    | error                                                                                                                                                                                                                                                                                               |
| empty_parameters                        | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| empty_parentheses_with_trailing_closure | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| explicit_init                           | yes    | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| file_header                             | yes    | no          | yes                    | warning, required_string: nil, required_pattern: Optional("\\/\\/\n\\/\\/  .*?\\.swift\n\\/\\/  SwiftLint\n\\/\\/\n\\/\\/  Created by .*? on \\d{1,2}\\/\\d{1,2}\\/\\d{2}\\.\n\\/\\/  Copyright © \\d{4} Realm\\. All rights reserved\\.\n\\/\\/\n"), forbidden_string: nil, forbidden_pattern: nil |
| file_length                             | no     | no          | yes                    | warning: 400, error: 1000                                                                                                                                                                                                                                                                           |
| force_cast                              | no     | no          | yes                    | error                                                                                                                                                                                                                                                                                               |
| force_try                               | no     | no          | yes                    | error                                                                                                                                                                                                                                                                                               |
| force_unwrapping                        | yes    | no          | no                     | warning                                                                                                                                                                                                                                                                                             |
| function_body_length                    | no     | no          | yes                    | warning: 40, error: 100                                                                                                                                                                                                                                                                             |
| function_parameter_count                | no     | no          | yes                    | warning: 5, error: 8                                                                                                                                                                                                                                                                                |
| implicit_getter                         | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| leading_whitespace                      | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| legacy_cggeometry_functions             | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| legacy_constant                         | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| legacy_constructor                      | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| legacy_nsgeometry_functions             | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| line_length                             | no     | no          | yes                    | warning: 100, error: 200                                                                                                                                                                                                                                                                            |
| mark                                    | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| missing_docs                            | yes    | no          | no                     | warning: source.lang.swift.accessibility.public, warning: source.lang.swift.accessibility.open                                                                                                                                                                                                      |
| nesting                                 | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| nimble_operator                         | yes    | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| number_separator                        | yes    | no          | no                     | warning                                                                                                                                                                                                                                                                                             |
| opening_brace                           | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| operator_usage_whitespace               | yes    | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| operator_whitespace                     | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| overridden_super_call                   | yes    | no          | yes                    | warning, excluded: [[]], included: [["*"]]                                                                                                                                                                                                                                                          |
| private_outlet                          | yes    | no          | yes                    | warning, allow_private_set: false                                                                                                                                                                                                                                                                   |
| private_unit_test                       | no     | no          | yes                    | warning: XCTestCase                                                                                                                                                                                                                                                                                 |
| prohibited_super_call                   | yes    | no          | no                     | warning, excluded: [[]], included: [["*"]]                                                                                                                                                                                                                                                          |
| redundant_nil_coalescing                | yes    | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| redundant_string_enum_value             | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| return_arrow_whitespace                 | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| statement_position                      | no     | yes         | yes                    | (statement_mode) default, (severity) warning                                                                                                                                                                                                                                                        |
| switch_case_on_newline                  | yes    | no          | no                     | warning                                                                                                                                                                                                                                                                                             |
| syntactic_sugar                         | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| todo                                    | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| trailing_comma                          | no     | no          | yes                    | warning, mandatory_comma: false                                                                                                                                                                                                                                                                     |
| trailing_newline                        | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| trailing_semicolon                      | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| trailing_whitespace                     | no     | yes         | yes                    | warning, ignores_empty_lines: false, ignores_comments: true                                                                                                                                                                                                                                         |
| type_body_length                        | no     | no          | yes                    | warning: 200, error: 350                                                                                                                                                                                                                                                                            |
| type_name                               | no     | no          | yes                    | (min_length) w/e: 3/0, (max_length) w/e: 40/1000                                                                                                                                                                                                                                                    |
| unused_closure_parameter                | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| unused_enumerated                       | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| valid_docs                              | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| valid_ibinspectable                     | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
| variable_name                           | no     | no          | yes                    | (min_length) w/e: 3/2, (max_length) w/e: 40/60                                                                                                                                                                                                                                                      |
| vertical_whitespace                     | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| void_return                             | no     | yes         | yes                    | warning                                                                                                                                                                                                                                                                                             |
| weak_delegate                           | no     | no          | yes                    | warning                                                                                                                                                                                                                                                                                             |
+-----------------------------------------+--------+-------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

@marcelofabri marcelofabri added the bug Unexpected and reproducible misbehavior. label Dec 18, 2016
@jpsim
Copy link
Collaborator

jpsim commented Aug 4, 2017

What if we just truncated the configuration column to a max of say 60 characters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

No branches or pull requests

2 participants