-
-
Notifications
You must be signed in to change notification settings - Fork 404
[skip changelog] Sync general formatting check workflow with template #1380
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
Conversation
Since they are the most affected, I'd be interested to get the opinion of @silvanocerza or @cmaglie on this:
|
I think it's ok formatting all files even if they're in a certain sense external, the format must not matter for testing purposes only that they're well formed. So I'd add on Also I think the deprecation warning for the old task commands are not necessary, we can just delete them. |
OK, will do. Thanks for your feedback.
OK, I will do that then. I wasn't sure whether the removal would be disruptive to anyone's development workflow, but the taskfile is a lot cleaner without a bunch of these deprecated tasks cluttering it up. |
What's going on with this check? Rerunning didn't help. 🤔 |
Oops, I should have commented about that. I was pretty burned out by the end of the day and had to give it a rest once I hit the unit test failures resulting from the reformatting breaking the index file signature. The Line 239 in c44c05a
It's unintuitive that a workflow that doesn't have anything to do with Go causes this diff, but the go list command runs anytime any task is called.
I'm planning to submit a PR to introduce arduino/tooling-project-assets@a98ac6c into the repository later today along with the general sync to the "template" Go check system. That change should sidestep this whole issue. So I think the best approach is to just accept that the "Check Prettier Formatting" workflow will have a spurious failure for a short period rather than wasting time trying to find a solution for a problem that is just going to disappear anyway. |
We have assembled a collection of reusable GitHub Actions workflows: https://github.com/arduino/tooling-project-assets These workflows will be used in the repositories of all Arduino tooling projects. The Prettier formatting tool is used in the tasks for formatting and checking the formatting of the repository's Markdown and YAML files. Prettier supports a long list of other languages. There is no reason not to take advantage of those capabilities as well, so the new workflow applies it to all supported files. Several of the tasks have been deprecated in favor of the new `general:format-prettier` task: - `docs:check` - `docs:format` - `config:check` - `config:format` These still work as before, but they now display a deprecation warning.
These are replaced by the `general:format-prettier` task. Even though that doesn't provide a formatting compliance check, the developer doesn't have any need for such a thing, since they will be better off to simply format, and the CI now takes the approach of formatting and then failing if it produced a diff.
…iance Previously, Prettier was only run on the Markdown and YAML files. With the new expanded scope of Prettier coverage, the JSON files are now required to be compliant.
Ok, good to know. Am ok with letting this fail for the time being. 👍 |
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)Infrastructure update
We have assembled a collection of reusable GitHub Actions workflows:
https://github.com/arduino/tooling-project-assets
These workflows will be used in the repositories of all Arduino tooling projects.
Some minor improvements and standardizations have been made in the upstream "template" workflow, but have not yet been pulled into this repository.
The Prettier formatting tool is used in the tasks for formatting and checking the formatting of the repository's Markdown and YAML files, but its capabilities with other languages are not utilized.
Workflow is synced with the state of the art from upstream.
Prettier formatting is applied to all supported files.
Several of the tasks have been deprecated in favor of the new
general:format-prettier
task:docs:check
docs:format
config:check
config:format
These still work as before, but they now display a deprecation warning.
titled accordingly?
No
Yes
The "Check Prettier Formatting" workflow run currently fails due to non-compliant formatting in many test data JSON files. With the exception of data that is intentionally non-compliant (e.g., arduino/libraries/librariesindex/testdata/invalid.json), I think it make sense to apply the formatting style even to test data files that are maintained in this repository. The exception would be files that are externally maintained, with the intent to sync their copies in this repository from upstream. I don't have any idea of what the maintenance status is of these files, so I will need input on whether the
.prettierignore
file needs to be expanded.I would probably submit a separate PR if a significant number of formatting updates are needed, since they are likely better put in a separate commit.