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

Move editorconfig-checker to lint-backend and remove JS wrapper #18793

Merged
merged 4 commits into from
Feb 18, 2022

Conversation

silverwind
Copy link
Member

It makes more sense there as templates are considered backend code.

@silverwind silverwind added skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile labels Feb 17, 2022
It makes more sense there as templates are considered backend code.
@silverwind
Copy link
Member Author

Hmm this isn't so easy because the command depends on node and npx presence which isn't there in some docker images used on the CI. I guess we should probably just keep it in lint-frontend as I want to avoid installing node in those images.

@silverwind silverwind closed this Feb 17, 2022
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 17, 2022
@silverwind
Copy link
Member Author

silverwind commented Feb 17, 2022

The editorconfig-checker tool itself is golang (https://github.com/editorconfig-checker/editorconfig-checker), so it might be possible to use it directly via go install instead of the npx wrapper, will check that out later.

@silverwind silverwind reopened this Feb 17, 2022
@silverwind silverwind marked this pull request as draft February 17, 2022 09:14
@silverwind
Copy link
Member Author

go install method seems to work, added it to their README in editorconfig-checker/editorconfig-checker#195.

@silverwind silverwind changed the title Move editorconfig-checker to lint-backend Move editorconfig-checker to lint-backend and remove JS wrapper Feb 17, 2022
@silverwind silverwind marked this pull request as ready for review February 17, 2022 17:13
@silverwind
Copy link
Member Author

Ready for review. Now this directly uses the golang tool, eliminating the JS wrapper and a bunch of indirect npm dependencies as well.

Copy link
Contributor

@Gusted Gusted left a comment

Choose a reason for hiding this comment

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

This should also be added to the test environment: https://gitea.com/gitea/test-env just like golangci-lint

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 17, 2022
@silverwind
Copy link
Member Author

silverwind commented Feb 17, 2022

I still hope that golang some day will provide a solution to define devDependencies in go.mod so we don't need to do global installation.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 17, 2022
@lunny lunny merged commit 6767798 into go-gitea:main Feb 18, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 18, 2022
* giteaofficial/main:
  Fix ldap loginname (go-gitea#18789)
  Replace deprecated String.prototype.substr() with String.prototype.slice() (go-gitea#18796)
  Fix problem when self-assign notification (go-gitea#18797)
  Move editorconfig-checker to lint-backend and remove JS wrapper (go-gitea#18793)
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
…itea#18793)

* Move editorconfig-checker to lint-backend

It makes more sense there as templates are considered backend code.

* User golang version of the tool

* remove dependency
@wxiaoguang wxiaoguang added this to the 1.17.0 milestone Mar 29, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants