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

Creating IDE Specific configuration with gradle #262

Merged
merged 1 commit into from Jun 20, 2020

Conversation

aepfli
Copy link
Member

@aepfli aepfli commented May 23, 2020

I added a small build.gradle file, which uses gradle dsl, as i found it
easiert to manipulate xml with. This snippet will add the issue link to
idea on each sync.

The questions to answer is, if we want to stick to groovy and mix kotlin
and groovy dsl. Which might be a bad idea. Sadly i have not had the time
to check if there is a convenient way to do so.

I just want to show this, and cross check if that might be suitable for
our cause or not. (i think at least for now it is)

closes: #229


I hereby agree to the terms of the JUnit Pioneer Contributor License Agreement.

I added a small build.gradle file, which uses gradle dsl, as i found it
easiert to manipulate xml with. This snippet will add the issue link to
idea on each sync.

The questions to answer is, if we want to stick to groovy and mix kotlin
and groovy dsl. Which might be a bad idea. Sadly i have not had the time
to check if there is a convenient way to do so.

I just want to show this, and cross check if that might be suitable for
our cause or not. (i think at least for now it is)

closes: junit-pioneer#229
@sonarcloud
Copy link

sonarcloud bot commented May 23, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@aepfli aepfli requested a review from a team May 24, 2020 17:38
@Bukama
Copy link
Member

Bukama commented May 25, 2020

First let me point out, that I'm a bit confused. I understand Marc and Vladimir that they suggest, that this should not be part of gradle, but of IDEA - but maybe I misunderstood them or forgot something we have talked about.

Aside from that:

Looks nice and works perfect! But we should mentioned that it needs a restart of IDEA, if no .idea folder was there before. I had cloned your repository, imported it to IDEA and the links inside the history didn't work. After a restart they worked smoothly.

githistory

This brings up the discussion about putting the Issue or PR number back to commit header. I'll open an bishue for that, referencing this PR and the underlying bishue.

@Bukama Bukama self-requested a review May 25, 2020 13:55
@Bukama
Copy link
Member

Bukama commented May 25, 2020

Wah, whole team review was requested, I did one and did that for the whole team :eek:

@aepfli
Copy link
Member Author

aepfli commented May 25, 2020

Looks nice and works perfect! But we should mentioned that it needs a restart of IDEA, if no .idea folder was there before. I had cloned your repository, imported it to IDEA and the links inside the history didn't work. After a restart they worked smoothly.

It should normally work as soon as you sync your project. as the internal build.gradle is executed in this step. if you want to try again, you could go to your IDEA settings and remove the Issue Navigation-entries and retrigger a sync
image

@aepfli
Copy link
Member Author

aepfli commented May 25, 2020

This brings up the discussion about putting the Issue or PR number back to commit header. I'll open an bishue for that, referencing this PR and the underlying bishue.

but there will be also clickable links in the commit message, just not as convinient as in the title

@Bukama
Copy link
Member

Bukama commented May 25, 2020

This brings up the discussion about putting the Issue or PR number back to commit header. I'll open an bishue for that, referencing this PR and the underlying bishue.

but there will be also clickable links in the commit message, just not as convinient as in the title

Ah okay, didn't understand it that way 👍

Please write this down in #264

@aepfli
Copy link
Member Author

aepfli commented May 26, 2020

to be fully annoying we could also add

  <component name="CommitMessageInspectionProfile">
    <profile version="1.0">
      <inspection_tool class="BodyLimit" enabled="true" level="WARNING" enabled_by_default="true" />
      <inspection_tool class="SubjectBodySeparation" enabled="true" level="WARNING" enabled_by_default="true" />
      <inspection_tool class="SubjectLimit" enabled="true" level="WARNING" enabled_by_default="true" />
    </profile>
  </component>

to the configuration, which will help when writing commit messages with idea. Like limit the body, adding a separation and a subjectlimit

@Bukama
Copy link
Member

Bukama commented May 27, 2020

to be fully annoying we could also add

  <component name="CommitMessageInspectionProfile">
    <profile version="1.0">
      <inspection_tool class="BodyLimit" enabled="true" level="WARNING" enabled_by_default="true" />
      <inspection_tool class="SubjectBodySeparation" enabled="true" level="WARNING" enabled_by_default="true" />
      <inspection_tool class="SubjectLimit" enabled="true" level="WARNING" enabled_by_default="true" />
    </profile>
  </component>

to the configuration, which will help when writing commit messages with idea. Like limit the body, adding a separation and a subjectlimit

Can you describe this in more detail? I don't understand what you mean by "limit the body"? Why should there a limit how long the body size can be in vertical terms?

@aepfli
Copy link
Member Author

aepfli commented May 27, 2020

image
BodyLimit = line length defaults to 72
subjectLimit line length defautls to 72
SubjectBodySeperation = an empty line has to be between subject and body

Those will be shown as warnings in the intellij commit dialog

@Bukama
Copy link
Member

Bukama commented Jun 11, 2020

@aepfli If you turn this into a PR I would approved.

@aepfli aepfli marked this pull request as ready for review June 13, 2020 09:17
@nipafx nipafx merged commit 687fab5 into junit-pioneer:master Jun 20, 2020
@aepfli aepfli deleted the issues/229-IDE-Config branch May 31, 2021 17:05
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.

Providing features for specific IDE
3 participants