Skip to content

Appease scalafmt with extraneous comma#978

Merged
jadams-tresys merged 1 commit intomainfrom
fix_format
Mar 3, 2023
Merged

Appease scalafmt with extraneous comma#978
jadams-tresys merged 1 commit intomainfrom
fix_format

Conversation

@jadams-tresys
Copy link
Contributor

In my last PR I missed that scalafmt wasn't happy after I removed what I thought was an extraneous comma. The PR page said that all checks had passed, but it must have been stale and needed refreshing to see the scalamt fail.

Copy link
Member

@stevedlawrence stevedlawrence left a comment

Choose a reason for hiding this comment

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

+1, I'm not sure why there's all the extra runs in the github actions. Maybe it's because you accidentally pushed to the apache/daffodil repo instead of your fork? FYI, I came acrossd a bit of a hack that prevents this: Assuming "asf" is your apache/daffodil remote, you can do:

git remote set-url --push asf "push to apache/daffodil disabled"

This is a hack because it changes the push url for the asf remote to a string that doesn't resolve to an actual repo. So git will complain if you ever try to push to asf.

@mbeckerle
Copy link
Contributor

mbeckerle commented Mar 3, 2023 via email

@jadams-tresys
Copy link
Contributor Author

Ah, I think I realized what happened. On my one machine I have my "origin" set to my daffodil fork, but the other machine 'origin' points to the main branch. My mistake there.

@stevedlawrence
Copy link
Member

We should add this command to some setup instructions.

Good call. I've added it to step 6 of the Code Contributor Workflow

@mbeckerle
Copy link
Contributor

Honestly, the only way I stay sane with git is no remote is named "origin". I name them all based on who owns them. My fork is named mbeckerle. If for review I pull down someone else' fork to look at more closely than a github review, the name of that remote is that person's username. The central daffodil repo is named "asf", at my job the central repos for other projects are named "owl", or if they are for clients it's the client/project's name.

SDW(
WarnID.InvalidAnnotationPoint,
"Annotations placed directly on a group definition will be ignored by DFDL. Any annotation expected to be processed by DFDL should instead be placed on the group reference, sequence or choice."
"Annotations placed directly on a group definition will be ignored by DFDL. Any annotation expected to be processed by DFDL should instead be placed on the group reference, sequence or choice.",
Copy link
Contributor

Choose a reason for hiding this comment

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

If this comma is truly required, then our scalafmt rules are wrong.

This comma should be tolerated, ... maybe... but not required.

This is not a list, it's the arguments to a function call. They are fundamentally different concepts that only occasionally overlap.

Copy link
Contributor

@tuxji tuxji left a comment

Choose a reason for hiding this comment

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

+1

@jadams-tresys jadams-tresys merged commit abbdc0f into main Mar 3, 2023
@jadams-tresys jadams-tresys deleted the fix_format branch March 3, 2023 15:36
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