You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by bo...@apache.org on 2022/12/04 21:19:14 UTC

[streampipes] branch some-more-checkstyle-enablements created (now c9868a912)

This is an automated email from the ASF dual-hosted git repository.

bossenti pushed a change to branch some-more-checkstyle-enablements
in repository https://gitbox.apache.org/repos/asf/streampipes.git


      at c9868a912 add checkstyle to streampipes-model-shared

This branch includes the following new commits:

     new 0ecf49472 add checkstyle to streampipes-logging
     new c9868a912 add checkstyle to streampipes-model-shared

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[streampipes] 02/02: add checkstyle to streampipes-model-shared

Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bossenti pushed a commit to branch some-more-checkstyle-enablements
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit c9868a912eb443948f4f46d21d36105bf083edc4
Author: bossenti <bo...@posteo.de>
AuthorDate: Sun Dec 4 22:01:50 2022 +0100

    add checkstyle to streampipes-model-shared
---
 streampipes-model-shared/pom.xml | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/streampipes-model-shared/pom.xml b/streampipes-model-shared/pom.xml
index ff9004036..f973f91fb 100644
--- a/streampipes-model-shared/pom.xml
+++ b/streampipes-model-shared/pom.xml
@@ -27,5 +27,25 @@
 
     <artifactId>streampipes-model-shared</artifactId>
 
-
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>validate</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <logViolationsToConsole>true</logViolationsToConsole>
+                    <failOnViolation>true</failOnViolation>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>
\ No newline at end of file


[streampipes] 01/02: add checkstyle to streampipes-logging

Posted by bo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bossenti pushed a commit to branch some-more-checkstyle-enablements
in repository https://gitbox.apache.org/repos/asf/streampipes.git

commit 0ecf494723f479c94645a2aeca60983b24a5f2c8
Author: bossenti <bo...@posteo.de>
AuthorDate: Sun Dec 4 22:01:11 2022 +0100

    add checkstyle to streampipes-logging
---
 streampipes-logging/pom.xml                        | 24 +++++++++-
 .../apache/streampipes/logging/LoggerFactory.java  |  6 +--
 .../org/apache/streampipes/logging/api/Logger.java | 10 ++---
 .../logging/impl/EventStatisticLogger.java         |  8 ++--
 .../apache/streampipes/logging/impl/PeLogger.java  | 52 +++++++++++-----------
 .../streampipes/logging/model/LogRequest.java      | 42 ++++++++---------
 6 files changed, 82 insertions(+), 60 deletions(-)

diff --git a/streampipes-logging/pom.xml b/streampipes-logging/pom.xml
index bec092970..8917cc0f7 100644
--- a/streampipes-logging/pom.xml
+++ b/streampipes-logging/pom.xml
@@ -17,7 +17,8 @@
   ~
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>streampipes-parent</artifactId>
         <groupId>org.apache.streampipes</groupId>
@@ -35,4 +36,25 @@
             <artifactId>slf4j-api</artifactId>
         </dependency>
     </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>validate</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <logViolationsToConsole>true</logViolationsToConsole>
+                    <failOnViolation>true</failOnViolation>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>
\ No newline at end of file
diff --git a/streampipes-logging/src/main/java/org/apache/streampipes/logging/LoggerFactory.java b/streampipes-logging/src/main/java/org/apache/streampipes/logging/LoggerFactory.java
index 4fdcb9656..883ac39aa 100644
--- a/streampipes-logging/src/main/java/org/apache/streampipes/logging/LoggerFactory.java
+++ b/streampipes-logging/src/main/java/org/apache/streampipes/logging/LoggerFactory.java
@@ -24,8 +24,8 @@ import org.apache.streampipes.logging.impl.PeLogger;
 public class LoggerFactory {
 
   //  public static Logger getPeLogger(Class clazz, String correspondingPipeline, String peUri, PeConfig peConfig) {
-    public static Logger getPeLogger(Class clazz, String correspondingPipeline, String peUri) {
+  public static Logger getPeLogger(Class clazz, String correspondingPipeline, String peUri) {
     //    return new PeLogger(clazz, correspondingPipeline, peUri, peConfig);
-        return new PeLogger(clazz, correspondingPipeline, peUri);
-    }
+    return new PeLogger(clazz, correspondingPipeline, peUri);
+  }
 }
diff --git a/streampipes-logging/src/main/java/org/apache/streampipes/logging/api/Logger.java b/streampipes-logging/src/main/java/org/apache/streampipes/logging/api/Logger.java
index 76defc3e9..c1ee5288b 100644
--- a/streampipes-logging/src/main/java/org/apache/streampipes/logging/api/Logger.java
+++ b/streampipes-logging/src/main/java/org/apache/streampipes/logging/api/Logger.java
@@ -22,13 +22,13 @@ import java.io.Serializable;
 
 public interface Logger extends Serializable {
 
-    void info(String s);
+  void info(String s);
 
-    void trace(String s);
+  void trace(String s);
 
-    void debug(String s);
+  void debug(String s);
 
-    void error(String s);
+  void error(String s);
 
-    void warn(String s);
+  void warn(String s);
 }
diff --git a/streampipes-logging/src/main/java/org/apache/streampipes/logging/impl/EventStatisticLogger.java b/streampipes-logging/src/main/java/org/apache/streampipes/logging/impl/EventStatisticLogger.java
index 050c558c0..559ce892a 100644
--- a/streampipes-logging/src/main/java/org/apache/streampipes/logging/impl/EventStatisticLogger.java
+++ b/streampipes-logging/src/main/java/org/apache/streampipes/logging/impl/EventStatisticLogger.java
@@ -23,10 +23,10 @@ import java.io.Serializable;
 public class EventStatisticLogger implements Serializable {
 
 
-    // private String prefix;
+  // private String prefix;
 
-   // public static void log(org.apache.streampipes.model.base.InvocableStreamPipesEntity graph) {
-    public static void log(String name, String correspondingPipeline, String source) {
+  // public static void log(org.apache.streampipes.model.base.InvocableStreamPipesEntity graph) {
+  public static void log(String name, String correspondingPipeline, String source) {
     // TODO: Uncomment when "Event statistic" should be used
         /*    String prefix =  "SYSTEMLOG EVENT STATISTIC" + " - "
                 // + "serviceName: " + peConfig.getName() + " - "
@@ -36,6 +36,6 @@ public class EventStatisticLogger implements Serializable {
         org.slf4j.Logger logger = LoggerFactory.getLogger(EventStatisticLogger.class);
         logger.info(prefix + 1);
         */
-    }
+  }
 
 }
diff --git a/streampipes-logging/src/main/java/org/apache/streampipes/logging/impl/PeLogger.java b/streampipes-logging/src/main/java/org/apache/streampipes/logging/impl/PeLogger.java
index ce68d44a5..392cc8edd 100644
--- a/streampipes-logging/src/main/java/org/apache/streampipes/logging/impl/PeLogger.java
+++ b/streampipes-logging/src/main/java/org/apache/streampipes/logging/impl/PeLogger.java
@@ -19,44 +19,44 @@
 package org.apache.streampipes.logging.impl;
 
 import org.apache.streampipes.logging.api.Logger;
+
 import org.slf4j.LoggerFactory;
 
 public class PeLogger implements Logger {
 
-    private org.slf4j.Logger LOG;
-
-    private String prefix;
+  private org.slf4j.Logger logger;
 
+  private String prefix;
 
 
-    //public PeLogger(Class clazz, String correspondingPipeline, String peUri, PeConfig peConfig){
-    public PeLogger(Class clazz, String correspondingPipeline, String peUri){
-        this.prefix =  "USERLOG" + " - "
-                      // + "serviceName: " + peConfig.getName() + " - "
-                       + "correspondingPipeline: " + correspondingPipeline + " - "
-                       + "peURI: " + peUri + " - ";
+  //public PeLogger(Class clazz, String correspondingPipeline, String peUri, PeConfig peConfig){
+  public PeLogger(Class clazz, String correspondingPipeline, String peUri) {
+    this.prefix = "USERLOG" + " - "
+        // + "serviceName: " + peConfig.getName() + " - "
+        + "correspondingPipeline: " + correspondingPipeline + " - "
+        + "peURI: " + peUri + " - ";
 
-        LOG = LoggerFactory.getLogger(clazz);
-    }
+    logger = LoggerFactory.getLogger(clazz);
+  }
 
-    public void info(String s) {
-        LOG.info(prefix + s);
-    }
+  public void info(String s) {
+    logger.info(prefix + s);
+  }
 
-    public void trace(String s) {
-        LOG.trace(prefix + s);
-    }
+  public void trace(String s) {
+    logger.trace(prefix + s);
+  }
 
-    public void debug(String s) {
-        LOG.debug(prefix + s);
-    }
+  public void debug(String s) {
+    logger.debug(prefix + s);
+  }
 
-    public void error(String s) {
-        LOG.error(prefix + s);
-    }
+  public void error(String s) {
+    logger.error(prefix + s);
+  }
 
-    public void warn(String s) {
-        LOG.warn(prefix + s);
-    }
+  public void warn(String s) {
+    logger.warn(prefix + s);
+  }
 
 }
diff --git a/streampipes-logging/src/main/java/org/apache/streampipes/logging/model/LogRequest.java b/streampipes-logging/src/main/java/org/apache/streampipes/logging/model/LogRequest.java
index 79d727052..66fd5803e 100644
--- a/streampipes-logging/src/main/java/org/apache/streampipes/logging/model/LogRequest.java
+++ b/streampipes-logging/src/main/java/org/apache/streampipes/logging/model/LogRequest.java
@@ -20,31 +20,31 @@ package org.apache.streampipes.logging.model;
 
 public class LogRequest {
 
-    private String sourceID;
-    private String dateFrom;
-    private String dateTo;
+  private String sourceID;
+  private String dateFrom;
+  private String dateTo;
 
-    public String getSourceID() {
-        return sourceID;
-    }
+  public String getSourceID() {
+    return sourceID;
+  }
 
-    public void setSourceID(String source) {
-        this.sourceID = source;
-    }
+  public void setSourceID(String source) {
+    this.sourceID = source;
+  }
 
-    public String getDateFrom() {
-        return dateFrom;
-    }
+  public String getDateFrom() {
+    return dateFrom;
+  }
 
-    public void setDateFrom(String dateFrom) {
-        this.dateFrom = dateFrom;
-    }
+  public void setDateFrom(String dateFrom) {
+    this.dateFrom = dateFrom;
+  }
 
-    public String getDateTo() {
-        return dateTo;
-    }
+  public String getDateTo() {
+    return dateTo;
+  }
 
-    public void setDateTo(String dateTo) {
-        this.dateTo = dateTo;
-    }
+  public void setDateTo(String dateTo) {
+    this.dateTo = dateTo;
+  }
 }