Skip to content

Allow validation of code in a subdirectory#52

Open
timothyjward wants to merge 3 commits intozbeekman:masterfrom
timothyjward:subdirectory
Open

Allow validation of code in a subdirectory#52
timothyjward wants to merge 3 commits intozbeekman:masterfrom
timothyjward:subdirectory

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 <timothyjward@apache.org>
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.

2 participants