You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "SaptarshiSarkar12 (via GitHub)" <gi...@apache.org> on 2023/11/24 18:45:14 UTC
[I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
SaptarshiSarkar12 opened a new issue, #6161:
URL: https://github.com/apache/jmeter/issues/6161
### Use case
This project has a code style available in the `config/checkstyle` directory. **Checking whether the code in the Pull Requests or branches follows the project's code style and applying fixes accordingly is a tedious work**.
### Possible solution
A GitHub Action can be set up to check for checkstyle violations and automatically format those files according to the checkstyle configuration. The changes will be automatically pushed to the branch and PR's source branch.
### Possible workarounds
_No response_
### JMeter Version
5.6.1
### Java Version
java 20.0.2 2023-07-18
### OS Version
Ubuntu 23.10
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "SaptarshiSarkar12 (via GitHub)" <gi...@apache.org>.
SaptarshiSarkar12 commented on issue #6161:
URL: https://github.com/apache/jmeter/issues/6161#issuecomment-1826195954
@vlsi Yes, I just learned how to integrate Openrewrite in my Open-Source Java project - [Drifty](https://github.com/SaptarshiSarkar12/Drifty) and it is very good at its work. You can see that the last commit to that repo is about the Java files being formatted.

I will do two things -
- Add openrewrite to maven pom.xml file
- Add a GitHub Action to auto-format and push the changes to the respective branches and PRs.
So, can I work on this issue?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on issue #6161:
URL: https://github.com/apache/jmeter/issues/6161#issuecomment-1826287776
I'm -0.5 for pushing formats from GitHub Actions. I am afraid it would violate the Apache Software Foundation rules.
I would rather start with making PRs fail if there are unformatted changes. WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on issue #6161:
URL: https://github.com/apache/jmeter/issues/6161#issuecomment-1826014753
We use Autostyle for some of the automatic fixes: https://github.com/autostyle/autostyle
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "SaptarshiSarkar12 (via GitHub)" <gi...@apache.org>.
SaptarshiSarkar12 commented on issue #6161:
URL: https://github.com/apache/jmeter/issues/6161#issuecomment-1826300866
@vlsi Sorry, I couldn't find any relevant issue. Might be because it is a rule.
I am closing this issue then.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "SaptarshiSarkar12 (via GitHub)" <gi...@apache.org>.
SaptarshiSarkar12 closed issue #6161: CI: Add Auto-Format GitHub Actions for Java files
URL: https://github.com/apache/jmeter/issues/6161
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "SaptarshiSarkar12 (via GitHub)" <gi...@apache.org>.
SaptarshiSarkar12 commented on issue #6161:
URL: https://github.com/apache/jmeter/issues/6161#issuecomment-1826298512
@vlsi I am not sure if it would violate Apache Software Foundation Rules. But, automating the formatting of files is just saving time a bit - which I think helps developers to concentrate more on the logic and also helps in faster review.
It also gives a great experience for other contributors - they don't have to check for failure in code style themselves (let's think if there are huge changes made and multiple checkstyle violations have occurred).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on issue #6161:
URL: https://github.com/apache/jmeter/issues/6161#issuecomment-1826004694
"Checkstyle" is already configured, and I suggest we do not increase its verifications as Checkstyle produces hard to understand failure messages.
Do you think you could try integrating Openrewrite? See https://github.com/pgjdbc/pgjdbc/pull/2979
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "SaptarshiSarkar12 (via GitHub)" <gi...@apache.org>.
SaptarshiSarkar12 commented on issue #6161:
URL: https://github.com/apache/jmeter/issues/6161#issuecomment-1826305529
@vlsi Okay. I understood.
No, its fine - Apache can make rules. No problem in that. I just wanted to know if apache license mentions any kind of this statement as it is used by my project :sweat_smile:.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on issue #6161:
URL: https://github.com/apache/jmeter/issues/6161#issuecomment-1826302520
Apache 2 license does not forbid that. However, there are certain rules within the Apache Software Foundation.
You might raise an issue at LEGAL or start a discussion to get clarification. However, I doubt they would allow such bots.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on issue #6161:
URL: https://github.com/apache/jmeter/issues/6161#issuecomment-1826299789
> I am not sure if it would violate Apache Software Foundation Rules.
@SaptarshiSarkar12 , please show us the relevant issue at https://issues.apache.org/jira/browse/LEGAL or https://lists.apache.org/list.html?legal-discuss@apache.org that concludes that "robots are fine to commit formatting changes to the main branches".
Otherwise, I am not going to discuss and merge such an Action.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] CI: Add Auto-Format GitHub Actions for Java files [jmeter]
Posted by "SaptarshiSarkar12 (via GitHub)" <gi...@apache.org>.
SaptarshiSarkar12 commented on issue #6161:
URL: https://github.com/apache/jmeter/issues/6161#issuecomment-1826301405
@vlsi I have one question. Does **Apache v2 license** explicitly specify any such rules?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org