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

Warn on mis-indented code #12682

Open
2 tasks
adriaanm opened this issue Nov 5, 2019 · 8 comments
Open
2 tasks

Warn on mis-indented code #12682

adriaanm opened this issue Nov 5, 2019 · 8 comments

Comments

@adriaanm
Copy link
Contributor

adriaanm commented Nov 5, 2019

Scala 3 will have a few syntax "tweaks" -- we should already provide warnings in the 2 series where possible.

In general, I'm in favor of warning about things that don't make sense even without considering the 3.0 upgrade. For indentation, that would include:

  • accidental de-indent without closing brace
  • ....
@adriaanm adriaanm added this to the 2.13.2 milestone Nov 5, 2019
@adriaanm
Copy link
Contributor Author

adriaanm commented Nov 5, 2019

@smarter, what was the other warning requested in the meeting?

@smarter
Copy link
Member

smarter commented Nov 5, 2019

I don't remember a specific warning coming up ?

@neko-kai
Copy link

neko-kai commented Nov 6, 2019

Is this already decided? No hope for SIP committee to veto it?

@dwijnand
Copy link
Member

dwijnand commented Nov 6, 2019

It's still possible. This is just the subset of things that the new syntax would need of Scala 2 and make sense even without a new syntax in Scala 3.

@adriaanm
Copy link
Contributor Author

adriaanm commented Nov 6, 2019

Is this already decided? No hope for SIP committee to veto it?

This issue is meant to be independent of that, because the idea is to limit ourselves to improvements that will improve the Scala 2 experience.

[...] warning about things that don't make sense even without considering the 3.0 upgrade

In the one example I mentioned above, the idea would be to take the information encoded in indentation to give better warnings when a user forgets a closing brace/paren.

@smarter
Copy link
Member

smarter commented Nov 6, 2019

I think the confusion stems from the use of "eventual" in the title which usually means "inevitable" in English but which I assume Adriaan used to mean "possible" because of the false friends https://en.wiktionary.org/wiki/eventueel#Adverb / https://en.wiktionary.org/wiki/%C3%A9ventuel#Adjective ;).

@adriaanm adriaanm changed the title prepare for eventual indentation based syntax prepare for the eventuality of indentation based syntax Nov 6, 2019
@adriaanm
Copy link
Contributor Author

adriaanm commented Nov 6, 2019

@SethTisue SethTisue modified the milestones: 2.13.2, 2.13.3 Feb 6, 2020
@SethTisue SethTisue modified the milestones: 2.13.3, 2.13.4 May 15, 2020
@dwijnand dwijnand modified the milestones: 2.13.4, Backlog Oct 16, 2020
@SethTisue SethTisue changed the title prepare for the eventuality of indentation based syntax Warn on mis-indented code Oct 31, 2022
@SethTisue SethTisue transferred this issue from scala/scala-dev Oct 31, 2022
@SethTisue
Copy link
Member

I've transferred this over from scala-dev and narrowed the scope to just warning on mis-indented code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants