rust-maven-plugin
rust-maven-plugin copied to clipboard
Add `cargo clippy` support
I'm using this plugin in one of my projects, and I thought it would be nice to run clippy from the plugin.
Approach could be similar to #8
<plugin>
<groupId>io.questdb</groupId>
<artifactId>rust-maven-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<executions>
<execution>
<id>build-myrust</id>
<goals>
<goal>build</goal>
</goals>
</execution>
<execution>
<id>test-myrust</id>
<goals>
<goal>test</goal>
</goals>
</execution>
<execution>
<id>test-lintrust</id>
<goals>
<goal>clippy</goal>
</goals>
<configuration>
// Configurations for clippy
</configuration>
</execution>
</executions>
<configuration>
<path>src/main/rust/myrust</path>
<release>true</release>
<copyTo>${project.build.directory}/bin</copyTo>
</configuration>
</plugin>
This can be implemented by extending CargoMojoBase into CargoClippyMojo similar to CargoTestMojo
I'm happy to implement this and raise a PR, if you feel this could be useful upstream.