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

[2.x] Emit warning for unused #1470

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Friendseeker
Copy link
Member

@Friendseeker Friendseeker commented Oct 18, 2024

Let CI emit warning for unused import, unused variable etc.

@Friendseeker Friendseeker changed the title [2.x] Tell Scala Compiler to emit warning for unused [2.x] Emit warning for unused import Oct 18, 2024
@Friendseeker
Copy link
Member Author

Friendseeker commented Oct 18, 2024

Actually this is a good change to have in 1.10.x branch. Maybe do it in 1.10.x first and then forward merge?

In 1.10.x we have -Xfatal-warnings on for Scala 2.12 build so may need to do some grunt work.


Now I see why "-Ywarn-unused" was not enabled first... It sometimes have false positive

[error] D:\Repos\zinc\internal\zinc-classpath\src\main\scala\sbt\internal\inc\ReflectUtilities.scala:52:11: parameter value field in anonymous function is never used
[error]           field <- correspondingFields.get(method.getName)

I guess I shall take a break from linting for now. Having two branches & cross building against multiple Scala versions complicate things, and unused is far less important than deprecation warnings.

If anyone else is interested, feel free to takeover the PR.

@Friendseeker Friendseeker changed the title [2.x] Emit warning for unused import [2.x] Emit warning for unused Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant