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

Allow validation of code in a subdirectory #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

timothyjward
Copy link

Pull request summary

I wanted to set up the EditorConfig-Action in my repository but found a couple of blocking issues:

  • The .editorconfig and code to check is in a subfolder within the repository
  • The sparse checkout from the actions/checkout plugin ends up owned by a different user and so needs to be marked as safe

Both of these changes are enabled using properties passed to the action.

You can see the result (from my fork) being used at Eclipse sensiNact

Additional information

Pull request checklist

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes?
  • Have you successfully tested your changes locally?

In some cases validation is needed for a single path within the repository. It should be possible to select that path using a variable such as `REPOSITORY_PATH`
The container validating the editor config may have a different user - this can be fixed up by setting `ADD_SAFE_DIRECTORY` to `true`
Update the file search to work relative to the working directory, not the root of the repository

Signed-off-by: Tim Ward <[email protected]>
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.

None yet

2 participants