-
Notifications
You must be signed in to change notification settings - Fork 17
feat(#65): get lints for gh-pages in runtime #137
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com | ||
| * SPDX-License-Identifier: MIT | ||
| */ | ||
| package org.eolang.lints | ||
|
|
||
| /** | ||
| * This script is run using gplus in the script motives.sh. | ||
| * This script saves a file with the lint name and extension .md to the tmp folder. | ||
| * The motive of this lint is preserved as content. | ||
| * These files are saved for all active lints in the project. | ||
| * @todo #65:15min after fixing this problem with creation of groovy folder | ||
| * https://github.com/jcabi/jcabi-parent/issues/586, | ||
| * move this script to the src/main/groovy folder in package org.eolang.lints | ||
| * @todo #65:15min after moving motives.groovy into src/main/groovy we should add test, | ||
| * that verifies that this script correctly saves a list of all lint motifs to the tmp folder | ||
| */ | ||
|
|
||
| static def saveLint(Lint<?> lint) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Marat-Tim maybe we can setup tests for
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @h1alexbel when I tried to do this, I got an error jcabi/jcabi-parent#586 I added a puzzle to this fix
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Marat-Tim maybe you can remove the puzzle, since we released a new version of jcabi-parent? |
||
| new File("tmp/${lint.name()}.md").text = lint.motive() | ||
| } | ||
|
|
||
| new PkMono().forEach { | ||
| saveLint(it) | ||
| } | ||
|
|
||
| new PkWpa().forEach { | ||
| saveLint(it) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -622,6 +622,23 @@ | |
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.codehaus.gmavenplus</groupId> | ||
| <artifactId>gmavenplus-plugin</artifactId> | ||
| <version>4.1.1</version> | ||
| <configuration> | ||
| <scripts> | ||
| <script>./.github/motives.groovy</script> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Marat-Tim let's move the script into
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @h1alexbel when I tried to do this, I got an error jcabi/jcabi-parent#586 I added a puzzle to this fix
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @h1alexbel I'm not sure how to check this - could the presence of a groovy folder cause the entire Groovy runtime to be bundled into the final JAR?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Marat-Tim in the <profile>
<!--
Compile Groovy sources from src/main/groovy and src/test/groovy
directories.
-->
<id>groovy</id>
<activation>
<file>
<exists>${basedir}/src/main/groovy</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>3.0.24</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>4.2.0</version>
<configuration>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<id>jcabi-groovy</id>
<goals>
<goal>compile</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @h1alexbel Honestly, I don't quite get it
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Marat-Tim correct. Your Groovy scripts should be located in the <scripts>
<script>src/main/groovy/org/eolang/lints/SaveMotives.groovy</script>
</scripts> |
||
| </scripts> | ||
| </configuration> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>org.apache.groovy</groupId> | ||
| <artifactId>groovy</artifactId> | ||
| <version>4.0.26</version> | ||
| </dependency> | ||
| </dependencies> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> | ||
Uh oh!
There was an error while loading. Please reload this page.