Skip to content

Give a concrete definition of trivial methods and update the way they are identified in the CheckUnused phase #16640

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

Open
PaulCoral opened this issue Jan 9, 2023 · 0 comments
Labels
area:linting Linting warnings enabled with -W or -Xlint itype:enhancement stat:needs spec

Comments

@PaulCoral
Copy link
Contributor

PaulCoral commented Jan 9, 2023

In #16157, -Wunused:params do not report trivial methods. These are currently identified as in Scala 2, i.e. by checking if their right hand side type is either: a constant type, single type, a literal, etc. See this comment.

The idea is to give a concrete formal definition of trivial methods, and update the code that identify them here .

Here's an idea of a trivial method:

def foo(a: Int, b: String) = ???
@prolativ prolativ added itype:enhancement area:reporting Error reporting including formatting, implicit suggestions, etc stat:needs spec labels Jan 9, 2023
@jchyb jchyb added area:linting Linting warnings enabled with -W or -Xlint and removed area:reporting Error reporting including formatting, implicit suggestions, etc labels Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:linting Linting warnings enabled with -W or -Xlint itype:enhancement stat:needs spec
Projects
None yet
Development

No branches or pull requests

3 participants