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

Update error message on "Unwanted U+FEFF" found in *.csv files #1108

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

howard-e
Copy link
Contributor

@howard-e howard-e commented Aug 15, 2024

Preview Tests

An error message was being thrown when running npm run build which read:

Unwanted U+FEFF found for key testId at index 0 while processing CSV.
Unwanted U+FEFF found for key assertionId at index 0 while processing CSV.

Found this to be coming from tests/menu-button-actions-active-descendant/data/tests.csv and tests/menu-button-actions-active-descendant/data/assertions.csv. This PR updates the message to add more detail and to remove the invisible character from both files:

[tests/menu-button-actions-active-descendant]: Unwanted U+FEFF found for key testId at index 0 while processing tests.csv.
[tests/menu-button-actions-active-descendant]: Unwanted U+FEFF found for key assertionId at index 0 while processing assertions.csv.

Seems this was introduced in #1092.

@howard-e howard-e changed the title Update error message Update error message on "Unwanted U+FEFF" found in *.csv files Aug 15, 2024
@IsaDC
Copy link
Contributor

IsaDC commented Aug 15, 2024

Thank you @howard-e
That error confused me a few times.

@nschonni
Copy link
Contributor

May want to update https://github.com/w3c/aria-at/blob/master/.gitattributes to opt everything into eol=lf

@howard-e
Copy link
Contributor Author

@IsaDC said:

Thank you @howard-e That error confused me a few times.

No problem! I also confirmed that this won't create a new version in the app because the test content hasn't actually changed so if all is well to you here, feel free to merge!

@howard-e
Copy link
Contributor Author

howard-e commented Aug 19, 2024

May want to update https://github.com/w3c/aria-at/blob/master/.gitattributes to opt everything into eol=lf

@nschonni certainly could expand to include *.csv. Although the relation between eol and u+feff in this file is lost on me here. Is there?

@nschonni
Copy link
Contributor

You're right, it looks like there isn't anything native to git that will clean out the BOM. The encoding is set in .editorconfig, but I'm not sure how that would be enforced

Copy link
Contributor

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

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

Thanks for this! I needed to use the changes in this PR to make sense of the error I was seeing in the console in #1105 . I can confirm that these changes are helpful and necessary!

@howard-e howard-e merged commit caaa949 into master Aug 21, 2024
8 checks passed
@howard-e howard-e deleted the update-error-message branch August 21, 2024 13:32
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