Skip to content

Commit

Permalink
Issue checkstyle#614: Resolve MethodWithTooManyParameters, Naming, Ja…
Browse files Browse the repository at this point in the history
…vadoc IDEA violations
  • Loading branch information
Vyom-Yadav committed Aug 26, 2022
1 parent d9d70be commit 3be7f6e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,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 @@ -129,7 +129,7 @@ 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.
* @noinspection MethodWithTooManyParameters
*/
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

0 comments on commit 3be7f6e

Please sign in to comment.