maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [maven-checkstyle-plugin] eolivelli commented on a change in pull request #17: [MCHECKSTYLE-385] rework code to use a Violation.java class.
Date Fri, 03 Jan 2020 10:44:38 GMT
eolivelli commented on a change in pull request #17: [MCHECKSTYLE-385] rework code to use a
Violation.java class.
URL: https://github.com/apache/maven-checkstyle-plugin/pull/17#discussion_r362767801
 
 

 ##########
 File path: src/main/java/org/apache/maven/plugins/checkstyle/Violation.java
 ##########
 @@ -0,0 +1,229 @@
+package org.apache.maven.plugins.checkstyle;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Objects;
+import java.util.StringJoiner;
+
+/**
+ * Holds data about a single violation and represents the violation itself.
+ */
+public class Violation
+{
+
+  /**
+   * Indicates that a column is not set.
+   */
+  protected static final String NO_COLUMN = "-1";
+
+  /** The source file name relative to the project's root. */
+  private final String source;
+
+  /** File is the absolute file name to the checked file. */
+  private final String file;
+
+  private final String line;
+
+  private String column = NO_COLUMN;
 
 Review comment:
   I agree, let's make it immutable. the change is very little.
   btw it is not so important,
   I would like to move forward with this work, you have a new patch after this one, we can
enhance it during the next step

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message