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

Add SwiftLint and configure for Style #30

Closed
MadGeorge opened this issue Jul 2, 2023 · 4 comments · Fixed by #40
Closed

Add SwiftLint and configure for Style #30

MadGeorge opened this issue Jul 2, 2023 · 4 comments · Fixed by #40
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@MadGeorge
Copy link

Hi! Did not find any references to a linter and code style guides in the repo. It would be nice to have while the project does not become large and many other contributors joined the repository.

To not go too hard on a code style I would suggest using the existing one https://google.github.io/swift/ and for the linter SwiftLint. These two are battle-tested and used in many projects.

Feel free to close this issue without a response.

@STREGA STREGA added the documentation Improvements or additions to documentation label Jul 4, 2023
@STREGA STREGA changed the title Suggestion: Linter and codestyle Add SwiftLint and configure for Style Jul 4, 2023
@STREGA
Copy link
Contributor

STREGA commented Jul 4, 2023

I like it. I don't think I'll adopt a textbook of style requirements, but I'll look into SwiftLint and see if it can be configured to enforce a coding style to make it easier for contributors in the future.

@gregcotten
Copy link
Contributor

Just simply running

brew install swiftformat
swiftformat --swiftversion 5.8.1 .

and seeing what has changed could give you some ideas on what style guidelines you like/dislike.

I will probably mirror this repo with (mostly) swiftformat guidelines on top as I like their default rules and it is widely adopted, making the readability much better.

@STREGA
Copy link
Contributor

STREGA commented Jul 12, 2023

I'll look at swift-format too. I'll likely go with the style and tool the majority of official swift projects are using.

Going to wait to implement the style until right before the documentation audit which will happen immediately before v1.0.0 is tagged.

@STREGA STREGA linked a pull request Aug 2, 2023 that will close this issue
@STREGA STREGA added this to the GateEngine v1.0.0 milestone Aug 18, 2023
@STREGA
Copy link
Contributor

STREGA commented Aug 19, 2023

Using both SwiftLint and SwiftFormat.
Fixing all format issues will take some time and completion will be recorded in #43. Closing this.

@STREGA STREGA closed this as completed Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants