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

[WIP] Improve and extend mappings check command. #334

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

Conversation

modmuss50
Copy link
Member

@modmuss50 modmuss50 commented Jan 3, 2021

This PR is WIP, please suggest feedback and other possible checks. (Note this should not be checking yarn code styling, that would need to go else where, possibly by exposing the MappingCheck interface).

The package visablity checks have been made warnings as they shouldnt fail the build right now. I might expand the CLI to allow control over this.

Currently this PR adds checks for synthetic entries with names, and invalid entries. (Same as drop mappings)

@enbrain
Copy link
Contributor

enbrain commented Jan 6, 2021

Are these checks in the scope of this PR?

  • check for synthetic entries with javadoc
  • check for unnamed methods without params or javadoc
  • check for empty COMMENT
  • check for file names mismatch with class names

@ramidzkh
Copy link
Contributor

ramidzkh commented Jan 6, 2021

A check for the issues described in FabricMC/yarn#1145 would be nice

@@ -0,0 +1,7 @@
package cuchaz.enigma.command.checks;

public class CheckFailureException extends RuntimeException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally don't recommend overriding this. I see no point of this being an exception.

In fact, if the throwable/exception qualities are desirable, I suggest overriding fillInStackTrace to be no-op; otherwise the performance cost of creating exceptions are intensive, especially in loops

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.

4 participants