ottlinger commented on code in PR #233:
URL: https://github.com/apache/creadur-rat/pull/233#discussion_r1555658668


##########
apache-rat-core/src/main/java/org/apache/rat/analysis/matchers/CopyrightMatcher.java:
##########
@@ -104,13 +139,37 @@ public CopyrightMatcher(String id, String start, String 
stop, String owner) {
         }
     }
 
+    /**
+     * Gets the start date of the copyright.
+     * @return the start date of the copyright or {@code null} if not set
+     */
+    public String getStart() {
+        return start;
+    }
+
+    /**
+     * Gets the end date of the copyright.
+     * @return the end date of the copyright or {@code null} if not set
+     */
+    public String getEnd() {
+        return end;
+    }
+
+    /**
+     * Gets the owner of the copyright.
+     * @return the owner of the copyright or {@code null} if not set
+     */
+    public String getOwner() {
+        return owner;
+    }
+
     @Override
-    protected boolean doMatch(String line) {
-        String lowerLine = line.toLowerCase();
-        if (lowerLine.contains("copyright") || lowerLine.contains("(c)") || 
line.contains("©")) {
-            Matcher matcher = COPYRIGHT_PATTERN.matcher(line);
+    public boolean matches(IHeaders headers) {
+        String lowerLine = headers.raw().toLowerCase();
+        if (lowerLine.contains("copyright") || lowerLine.contains("(c)") || 
lowerLine.contains("©")) {

Review Comment:
   Would it make sense to match © as well in case of HTML files?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@creadur.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to