Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 17620)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 17621)
@@ -21,4 +21,5 @@
 import java.util.Set;
 import java.util.function.Consumer;
+import java.util.function.Predicate;
 import java.util.stream.Stream;
 
@@ -386,5 +387,14 @@
     @Override
     public void visit(Collection<OsmPrimitive> selection) {
-        if (progressMonitor != null) {
+        visit(selection, null);
+    }
+
+    /**
+     * Execute the rules from the URLs matching the given predicate.
+     * @param selection collection of primitives
+     * @param urlPredicate a predicate deciding whether the rules from the given URL shall be executed
+     */
+    void visit(Collection<OsmPrimitive> selection, Predicate<String> urlPredicate) {
+        if (urlPredicate == null && progressMonitor != null) {
             progressMonitor.setTicksCount(selection.size() * checks.size());
         }
@@ -396,4 +406,7 @@
             if (isCanceled()) {
                 break;
+            }
+            if (urlPredicate != null && !urlPredicate.test(entry.getKey())) {
+                continue;
             }
             visit(entry.getKey(), entry.getValue(), selection, surrounding);
@@ -480,23 +493,3 @@
     }
 
-    /**
-     * Execute only the rules for the rules matching the given file name. See #19180
-     * @param ruleFile the name of the mapcss file, e.g. deprecated.mapcss
-     * @param selection collection of primitives
-     * @since 16784
-     */
-    public void runOnly(String ruleFile, Collection<OsmPrimitive> selection) {
-        mpAreaCache.clear();
-
-        Set<OsmPrimitive> surrounding = new HashSet<>();
-        for (Entry<String, Set<MapCSSTagCheckerRule>> entry : checks.entrySet()) {
-            if (isCanceled()) {
-                break;
-            }
-            if (entry.getKey().endsWith(ruleFile)) {
-                visit(entry.getKey(), entry.getValue(), selection, surrounding);
-            }
-        }
-
-    }
 }
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 17620)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 17621)
@@ -1043,5 +1043,5 @@
             return 0;
         deprecatedChecker.getErrors().clear();
-        deprecatedChecker.runOnly("deprecated.mapcss", Collections.singleton(p));
+        deprecatedChecker.visit(Collections.singleton(p), url -> url.endsWith("deprecated.mapcss"));
         return deprecatedChecker.getErrors().size();
     }
