-
Notifications
You must be signed in to change notification settings - Fork 64
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
Executer for lint using dotnet format #13
Comments
For this and other tool-based features, we'll need a way to manage .NET tools. The two ways we could install a tool are globally and locally. I prefer locally as this matches npm devDependencies. To install and use a local tool, the plugin would need to
Other developers using the same repository will not need to install the tool again, but they will need to run Next, we would need to handle updating the tool as it publishes new releases, as this plugin publishes new releases, or both. It's also possible that we would need to handle uninstalling the tool, if this plugin were ever uninstalled. @AgentEnder Any guidance on how you would architect this solution? |
I definitely agree about installing tools being the path for getting this executor up and running. I see something like this:
I'll create new issues for the tool management when I am home this evening. After we get tool-mgmt in, this executor should be pretty quick to test. |
With #44 closed, if anyone wants to take this feel free. The main things to remember is that we should support all options that dotnet format does. I would want |
I can work on this today. How do you want to handle the list-style options (diagnostics, include, exclude)? Should the schema allow for an array, or should the executor expect that the user has already formatted the list appropriately (comma or space separated)? |
I don't believe the schema.json files allow for array types (if I am wrong, correct me as this is what would be ideal). Try a comma separated string and check if that works, if that does work we can go forward with that (noting it in the description of the option). If that does not work, we will figure something else out. |
JSON Schema files allow for arrays. The better question is if Nx allows for arrays. If we specify an array type in the schema.json, then users will be able to type the value as an array in workspace.json, but they might not be able to use that option through the command line. I don't know how or even if Nx handles list-style options when coercing command line arguments to the JS object received by the executor. Consider the default Angular builder. It uses an array to specify assets, styles, and scripts that should be bundled with the application, but these options can't be specified by command line. They're only specified in workspace.json. |
Type them as arrays than, but for diagnostics in particular I could see someone wanting to run against 1 particular diagnostic as a use case so it may be worth adding a |
Add a new executor to lint and format projects using an external tool. Fixes #13
Should the new format executor be added to new projects by default? Should a migration be created to add it to existing projects that use an older version of the plugin? |
I would add it to all projects, but call lint instead since that will be the default functionality. |
@bcallaghan-et you could have the executor be called format since it is calling |
🎉 This issue has been resolved in version 0.7.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
https://github.com/dotnet/format
The text was updated successfully, but these errors were encountered: