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

Excessive use of disabled commands in SwiftLint #732

Open
vigotskij opened this issue Dec 14, 2023 · 1 comment
Open

Excessive use of disabled commands in SwiftLint #732

vigotskij opened this issue Dec 14, 2023 · 1 comment
Labels
devx Work that will improve developer experience/velocity good first issue Good for newcomers

Comments

@vigotskij
Copy link

Description:

I've observed a substantial number of disabled commands for SwiftLint in the codebase, which seems to counter the purpose of utilizing this tool effectively. The essence of SwiftLint lies in establishing and adhering to clear coding rules, contributing to improved code readability and clarity. However, the prevalent practice of disabling rules without adequate explanation can create confusion and convey the notion that exceptions override the rules.

Suggested Improvements:

1. Clear Documentation for Disabled Rules:

It would be beneficial to encourage contributors to provide clear explanations when disabling specific rules. This documentation can serve as valuable guidance for anyone entering the codebase, fostering a better understanding of the rationale behind each exception.

2. Contextual Rule Exceptions for Tests:

Introducing a feature that excludes certain rules during the parsing of test files could be beneficial. Tests often require different considerations, and exempting them from certain rules can lead to more flexible and contextually appropriate linting.

3. Enforcement of Healthier Coding Practices:

It's worth considering enforcing rules that encourage healthier coding practices, such as favoring optionals over force unwrapping. Incorporating these rules not only aligns with best practices but also contributes to a more robust and maintainable codebase.

Objective:

The objective is to enhance the effectiveness of SwiftLint as a code quality tool by minimizing the excessive use of disabled commands. This, in turn, will contribute to a more consistent, readable, and maintainable codebase.

@joshuatbrown joshuatbrown added the devx Work that will improve developer experience/velocity label Jun 4, 2024
@joshuatbrown
Copy link
Contributor

@vigotskij thanks again for another great suggestion! I totally agree, so I've moved this into our backlog so we can prioritize it.

@joshuatbrown joshuatbrown added the good first issue Good for newcomers label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devx Work that will improve developer experience/velocity good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

2 participants