Skip to content
Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ target/

# ---- Mac OS X
.DS_Store?
.DS_Store
Icon?
# Thumbnails
._*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ public interface FilePredicates {
/**
* Explicitely look for InputFile having any {@link InputFile#status()}
* @since 6.6
* @deprecated since 11.4, use {@link #hasStatus(InputFile.Status)} instead
*/
FilePredicate hasAnyStatus();
@Deprecated(forRemoval = true, since = "11.4")
default FilePredicate hasAnyStatus(){

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Coding style issues

return input -> true;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Sonar Plugin API
* Copyright (C) 2009-2025 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package org.sonar.api.batch.fs;

import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

import static org.junit.jupiter.api.Assertions.*;

class FilePredicatesTest {

FilePredicates filePredicates = Mockito.spy(FilePredicates.class);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Coding style issues


@Test
void hasAnyStatus_always_match() {
FilePredicate filePredicate = filePredicates.hasAnyStatus();
assertTrue(filePredicate.apply(null));
}
}