Skip to content

Commit

Permalink
Issue #440: resolves StaticMethodCandidate
Browse files Browse the repository at this point in the history
  • Loading branch information
rnveach authored and Calixte committed Jan 28, 2023
1 parent e5097b8 commit c432cf0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

/**
* Job that invokes Checkstyle on a list of workspace files.
*
*
* @author Lars Ködderitzsch
*/
public class RunCheckstyleOnFilesJob extends WorkspaceJob implements ISchedulingRule {
Expand All @@ -55,7 +55,7 @@ public class RunCheckstyleOnFilesJob extends WorkspaceJob implements IScheduling

/**
* Creates the job for a list of <code>IFile</code> objects.
*
*
* @param files
* the files to check
*/
Expand All @@ -68,7 +68,7 @@ public RunCheckstyleOnFilesJob(final List<IFile> files) {

/**
* Creates the job for a single file.
*
*
* @param file
* the file to check
*/
Expand Down Expand Up @@ -118,7 +118,8 @@ public final IStatus runInWorkspace(final IProgressMonitor monitor) throws CoreE
return Status.OK_STATUS;
}

private Map<IProject, List<IFile>> getFilesSortedToProject(final List<IFile> filesToCheck) {
private static Map<IProject, List<IFile>> getFilesSortedToProject(
final List<IFile> filesToCheck) {

Map<IProject, List<IFile>> projectFilesMap = new HashMap<>();

Expand All @@ -139,7 +140,7 @@ private Map<IProject, List<IFile>> getFilesSortedToProject(final List<IFile> fil
return projectFilesMap;
}

private void filter(final List<IFile> files, final IProjectConfiguration projectConfig) {
private static void filter(final List<IFile> files, final IProjectConfiguration projectConfig) {

List<IFilter> filters = projectConfig.getFilters();
for (IFilter filter : filters) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ private void initialize() {
* @param checkConfigName
* the name proposal
*/
private void setUniqueName(CheckConfigurationWorkingCopy config, String checkConfigName) {
private static void setUniqueName(CheckConfigurationWorkingCopy config, String checkConfigName) {
String uniqueName = checkConfigName;

int counter = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private String getCheckstyleVersion() {
/**
* Sets the default values of the preferences.
*/
private void initializeDefaults() {
private static void initializeDefaults() {
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ private ICompilationUnit getCompilationUnit(IMarker marker) {
return null;
}

private MarkerAnnotation getMarkerAnnotation(IAnnotationModel annotationModel, IMarker marker) {
private static MarkerAnnotation getMarkerAnnotation(IAnnotationModel annotationModel,
IMarker marker) {

Iterator<Annotation> iter = annotationModel.getAnnotationIterator();
while (iter.hasNext()) {
Expand Down

0 comments on commit c432cf0

Please sign in to comment.