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

Rule request - whitespace around operators #626

Closed
ghost opened this issue Apr 18, 2016 · 1 comment
Closed

Rule request - whitespace around operators #626

ghost opened this issue Apr 18, 2016 · 1 comment
Labels
rule-request Requests for a new rules.

Comments

@ghost
Copy link

ghost commented Apr 18, 2016

Hi

It would be great if there was a rule for enforcing whitespace around operators.

For example the following would report an error
a+b
a+ b
a +b
let a=b

@jpsim jpsim added the rule-request Requests for a new rules. label Apr 18, 2016
@norio-nomura
Copy link
Collaborator

Swift generate error on second and third examples:

  3> a+ b
repl.swift:3:3: error: consecutive statements on a line must be separated by ';'
a+ b
  ^
  ;

  3> a +b
repl.swift:3:2: error: consecutive statements on a line must be separated by ';'
a +b
 ^
 ;

So, this would be expected to generate violations on first and 4th examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule-request Requests for a new rules.
Projects
None yet
Development

No branches or pull requests

2 participants