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

Issue #614: Resolve MethodWithTooManyParameters, Naming, Javadoc IDEA violations #643

Merged
merged 1 commit into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public static void main(String... args) {
final Result notesBuilderResult = runGithubNotesBuilder(cliOptions);
errorCounter = notesBuilderResult.getErrorMessages().size();
if (errorCounter == 0) {
publicationErrors = MainProcess.run(notesBuilderResult.getReleaseNotes(),
cliOptions);
publicationErrors = MainProcess.runPostGenerationAndPublication(
notesBuilderResult.getReleaseNotes(), cliOptions);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ private MainProcess() {
* @throws IOException if I/O error occurs.
* @throws TemplateException if an error occurs while generating freemarker template.
*/
public static List<String> run(Multimap<String, ReleaseNotesMessage> releaseNotes,
CliOptions cliOptions) throws IOException, TemplateException {
public static List<String> runPostGenerationAndPublication(
Multimap<String, ReleaseNotesMessage> releaseNotes, CliOptions cliOptions)
throws IOException, TemplateException {
runPostGeneration(releaseNotes, cliOptions);
return runPostPublication(cliOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ public static Result buildResult(String localRepoPath, String authToken, String
* @param commit commit information.
* @param commitMessage commit message.
* @throws IOException if an I/O error occurs.
* @throws GitAPIException if an error occurs when accessing Git API.
nrmancuso marked this conversation as resolved.
Show resolved Hide resolved
* @noinspection MethodWithTooManyParameters
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Added @noinspectionreason

* @noinspectionreason MethodWithTooManyParameters - Method requires a lot of parameters to
* build the result with label.
*/
private static void buildResultWithLabel(String remoteRepoPath, Result result,
GHRepository remoteRepo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void setup() throws IOException {

@Test
public void testGenerateOnlyBreakingCompatibility() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(createAllNotes(), null, null, null, null), createBaseCliOptions()
.setGenerateAll(true).build());

Expand All @@ -77,7 +77,7 @@ public void testGenerateOnlyBreakingCompatibility() throws Exception {

@Test
public void testGenerateOnlyNewFeature() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(null, createAllNotes(), null, null, null), createBaseCliOptions()
.setGenerateAll(true).build());

Expand All @@ -92,7 +92,7 @@ public void testGenerateOnlyNewFeature() throws Exception {

@Test
public void testGenerateOnlyBug() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(null, null, createAllNotes(), null, null), createBaseCliOptions()
.setGenerateAll(true).build());

Expand All @@ -107,7 +107,7 @@ public void testGenerateOnlyBug() throws Exception {

@Test
public void testGenerateOnlyMisc() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(null, null, null, createAllNotes(), null), createBaseCliOptions()
.setGenerateAll(true).build());

Expand All @@ -121,7 +121,7 @@ public void testGenerateOnlyMisc() throws Exception {

@Test
public void testGenerateOnlyNewModule() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(null, null, null, null, createAllNotes()), createBaseCliOptions()
.setGenerateAll(true).build());

Expand All @@ -136,7 +136,7 @@ public void testGenerateOnlyNewModule() throws Exception {

@Test
public void testGenerateAll() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(
Collections.singletonList(createReleaseNotesMessage("Title 1", "Author 1")),
Collections.singletonList(createReleaseNotesMessage(2, "Title 2", "Author 2")),
Expand All @@ -156,7 +156,7 @@ public void testGenerateAll() throws Exception {

@Test
public void testGenerateOnlyXdoc() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(createAllNotes(), null, null, null, null), createBaseCliOptions()
.setGenerateXdoc(true).build());

Expand All @@ -171,7 +171,7 @@ public void testGenerateOnlyXdoc() throws Exception {

@Test
public void testGenerateOnlyTwitter() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(createAllNotes(), null, null, null, null), createBaseCliOptions()
.setGenerateTw(true).build());

Expand All @@ -186,7 +186,7 @@ public void testGenerateOnlyTwitter() throws Exception {

@Test
public void testGenerateOnlyRss() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(createAllNotes(), null, null, null, null), createBaseCliOptions()
.setGenerateRss(true).build());

Expand All @@ -201,7 +201,7 @@ public void testGenerateOnlyRss() throws Exception {

@Test
public void testGenerateOnlyMlist() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(createAllNotes(), null, null, null, null), createBaseCliOptions()
.setGenerateMlist(true).build());

Expand All @@ -216,7 +216,7 @@ public void testGenerateOnlyMlist() throws Exception {

@Test
public void testGenerateOnlyGitHub() throws Exception {
final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(createAllNotes(), null, null, null, null), createBaseCliOptions()
.setGenerateGitHub(true).build());

Expand All @@ -235,7 +235,7 @@ public void testGenerateCustomTemplate() throws Exception {
FileUtils.writeStringToFile(file, "hello world");
final String template = file.getAbsolutePath();

final List<String> errors = MainProcess.run(
final List<String> errors = MainProcess.runPostGenerationAndPublication(
createNotes(createAllNotes(), createAllNotes(), createAllNotes(), createAllNotes(),
createAllNotes()),
createBaseCliOptions().setGenerateAll(true).setXdocTemplate(template)
Expand Down