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

Support Arrays and ignore if statements #56

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

timtebeek
Copy link
Contributor

Pulled out of #53 for easier review and to minimize diff.

@timtebeek timtebeek added the enhancement New feature or request label Dec 25, 2023
@timtebeek timtebeek self-assigned this Dec 25, 2023

/**
* @param message The message to print
* @param symbol The symbol to attach the message to; printed as clickable link to file
*/
private void printNoteOnce(String message, Symbol.ClassSymbol symbol) {
if (printedMessages.add(message)) {
if (printedMessages.compute(message, (k, v) -> v == null ? 1 : v + 1) == 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why this change? Is this somehow more performant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's to allow one to inspect the number of times recipes are excluded, as used in this #47 (comment)

Didn't want to make that part of the standard output though; I think once and linked to the source is enough, as opposed to just a summary of how often there are exclusions not tied to a particular instance. Having this counter allows us to easily print it as a one off though.

@timtebeek timtebeek merged commit 10cd1b0 into main Dec 27, 2023
1 check passed
@timtebeek timtebeek deleted the support-arrrays-ignore-if-statements branch December 27, 2023 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants