You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2021/04/07 02:45:01 UTC

[groovy] branch master updated (178eb24 -> a91c7a3)

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

paulk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git.


    from 178eb24  GROOVY-9971: STC: support "Closure<String> c = { -> return "$v" }"
     new ba74387  Create codenarc.sh
     new aaa3d67  Update config.toml
     new be16079  add license header
     new a91c7a3  add comment around false positive unclosed resource warning

The 4 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.


Summary of changes:
 src/bin/groovyConsole => .muse/codenarc.sh         | 54 +++++++++++++---------
 .muse/config.toml                                  |  1 +
 .../groovy/json/internal/JsonStringDecoder.java    |  1 +
 3 files changed, 34 insertions(+), 22 deletions(-)
 copy src/bin/groovyConsole => .muse/codenarc.sh (53%)

[groovy] 01/04: Create codenarc.sh

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

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit ba743872b334bdd22264c07d43b4b19fa88eb435
Author: Stephen Magill <st...@gmail.com>
AuthorDate: Fri Feb 19 16:25:26 2021 -0500

    Create codenarc.sh
---
 .muse/codenarc.sh | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/.muse/codenarc.sh b/.muse/codenarc.sh
new file mode 100644
index 0000000..ab3bc85
--- /dev/null
+++ b/.muse/codenarc.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+commit=$2
+cmd=$3
+
+function version() {
+    echo 1
+}
+
+function applicable() {
+    echo "true"
+}
+
+function gettool() {
+  pushd /tmp >/dev/null
+  curl -s -o CodeNarc-2.0.0.tgz -LO https://github.com/smagill/codenarc-muse/blob/main/CodeNarc-2.0.0.tgz?raw=true
+  tar xzf CodeNarc-2.0.0.tgz
+  popd >/dev/null
+}
+
+function emit_results() {
+  echo "$1"
+}
+
+function run() {
+  gettool
+  raw_results=$(/tmp/codenarc ./)
+  emit_results "$raw_results"
+}
+
+if [[ "$cmd" = "run" ]] ; then
+  run
+fi
+if [[ "$cmd" = "applicable" ]] ; then
+  applicable
+fi
+if [[ "$cmd" = "version" ]] ; then
+  version
+fi

[groovy] 04/04: add comment around false positive unclosed resource warning

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

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit a91c7a375db07d27626cb36b56d999b5284b266e
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Apr 7 12:44:16 2021 +1000

    add comment around false positive unclosed resource warning
---
 .../src/main/java/org/apache/groovy/json/internal/JsonStringDecoder.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/JsonStringDecoder.java b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/JsonStringDecoder.java
index 6ac9a59..edc62cd 100644
--- a/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/JsonStringDecoder.java
+++ b/subprojects/groovy-json/src/main/java/org/apache/groovy/json/internal/JsonStringDecoder.java
@@ -28,6 +28,7 @@ public class JsonStringDecoder {
     }
 
     public static String decodeForSure(char[] chars, int start, int to) {
+        // consider wrapping in a try with resources block if CharBuf is ever refactored to have a non-empty close()
         CharBuf builder = CharBuf.create(to - start);
         builder.decodeJsonString(chars, start, to);
         return builder.toString();

[groovy] 03/04: add license header

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

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit be16079ce9a1a43e6e85d533b70769a99171437d
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Apr 7 12:43:27 2021 +1000

    add license header
---
 .muse/codenarc.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/.muse/codenarc.sh b/.muse/codenarc.sh
index ab3bc85..c9c5bdb 100644
--- a/.muse/codenarc.sh
+++ b/.muse/codenarc.sh
@@ -1,4 +1,22 @@
 #!/usr/bin/env bash
+# ----------------------------------------------------------------------------
+# 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.
+# ----------------------------------------------------------------------------
 commit=$2
 cmd=$3
 

[groovy] 02/04: Update config.toml

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

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit aaa3d67d0136ea392e46eba29477527d3d9635df
Author: Stephen Magill <st...@gmail.com>
AuthorDate: Fri Feb 19 16:25:51 2021 -0500

    Update config.toml
---
 .muse/config.toml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.muse/config.toml b/.muse/config.toml
index 9cc939f..889857b 100644
--- a/.muse/config.toml
+++ b/.muse/config.toml
@@ -14,3 +14,4 @@
 # limitations under the License.
 
 jdk11 = true
+customTools = [".muse/codenarc.sh"]