stevedlawrence commented on a change in pull request #42:
URL: https://github.com/apache/daffodil-vscode/pull/42#discussion_r736905401



##########
File path: project/Rat.scala
##########
@@ -0,0 +1,55 @@
+/*
+ * 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 sbt._
+
+object Rat {
+
+  lazy val excludes = Seq(
+
+    // git files
+    file(".git"),
+
+    // json files -- these ones do not support comments
+    file("snippets/dfdl.json"),
+    file("package.json"),
+    file(".prettierrc"),
+
+    // ignore images - daffiodil.jpg
+    file("images/daffodil.jpg"),
+
+    // yarn and rpm generated files
+    file("yarn.lock"),
+    file("package-lock.json"),
+  )
+
+  lazy val MIT_LICENSE_NAME = "MIT License"
+
+  lazy val MIT_LICENSE_TEXT_PASSERA =

Review comment:
       You can remove `PASSERA` in here since this license text isn't specific 
to passera. And actually since this is specifically for this Microsoft 
copyright header, maybe rename this `MIT_LICENSE_TEXT_MICROSOFT`, so if we ever 
add some other MIT licensed code with a different copyright we can handle that.

##########
File path: project/Rat.scala
##########
@@ -0,0 +1,55 @@
+/*
+ * 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 sbt._
+
+object Rat {
+
+  lazy val excludes = Seq(
+
+    // git files
+    file(".git"),
+
+    // json files -- these ones do not support comments
+    file("snippets/dfdl.json"),
+    file("package.json"),
+    file(".prettierrc"),
+
+    // ignore images - daffiodil.jpg
+    file("images/daffodil.jpg"),
+
+    // yarn and rpm generated files
+    file("yarn.lock"),
+    file("package-lock.json"),
+  )
+
+  lazy val MIT_LICENSE_NAME = "MIT License"
+
+  lazy val MIT_LICENSE_TEXT_PASSERA =
+"""
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the MIT License. See License.txt in the project root for 
license information.
+"""
+
+lazy val CREATIVE_COMMONS_LICENSE_NAME = "Creative Commons CC0 1.0 Universal"
+
+lazy val CREATIVE_COMMONS_LICENSE_TEXT_PASSERA =

Review comment:
       Same here, you can remove `PASSERA`. There is no company/project 
associated with this license text, so `CREATIVE_COMMONS_LICENSE_TEXT` is 
reasonable.

##########
File path: .github/workflows/rat-check.yml
##########
@@ -0,0 +1,48 @@
+# 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.
+
+---
+name: Rat Check
+
+on:
+  push:
+    branches-ignore: [ 'dependabot/**' ]
+  pull_request:
+    types: [opened, synchronize, reopened]
+
+jobs:
+  check:
+    name: Java 11, Scala 2.12.13, ubuntu-20.04
+    runs-on: ubuntu-20.04
+    defaults:
+      run:
+        shell: bash
+    env:
+      SBT: sbt -J-Xms1024m -J-Xmx5120m -J-XX:ReservedCodeCacheSize=512m 
-J-XX:MaxMetaspaceSize=1024m ++2.12.13
+    
+    steps:
+      - name: Setup Java
+        uses: actions/[email protected]
+        with:
+          distribution: temurin
+          java-version: 11
+
+      - name: Check out Repository
+        uses: actions/[email protected]

Review comment:
       2.3.5 is the latest version of actions/checkout, might as well update 
this now rather than wait for dependabot.

##########
File path: .eslintrc.json
##########
@@ -1,9 +1,10 @@
 /*
- * Copyright 2021 Concurrent Technologies Corporation, Nteligen LLC
- *
- * Licensed 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
+ * Licensed to the Apache Software Foundation (ASF) under one or more

Review comment:
       There's four files that still have the old CTC/Nteligen license headers:
   
   * NOTICE
   * README.md
   * create_vsix.sh
   * snippets/json-license.txt
   
   Those should all be updated to the ASF copyright. I think maybe we can 
delete the json-license.txt too?

##########
File path: .github/workflows/rat-check.yml
##########
@@ -0,0 +1,48 @@
+# 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.
+
+---
+name: Rat Check
+
+on:
+  push:
+    branches-ignore: [ 'dependabot/**' ]
+  pull_request:
+    types: [opened, synchronize, reopened]
+
+jobs:
+  check:
+    name: Java 11, Scala 2.12.13, ubuntu-20.04

Review comment:
       Suggest changing the name just "Rat Check" or something, java/scala/os 
doesn't really have anything to do with this workflow.

##########
File path: build.sbt
##########
@@ -38,11 +40,24 @@ lazy val commonSettings = {
   )
 }
 
+lazy val ratSettings = Seq(
+  ratLicenses := Seq(
+    ("MIT ", Rat.MIT_LICENSE_NAME, Rat.MIT_LICENSE_TEXT_PASSERA),
+    ("CREATIVE_COMMONS", Rat.CREATIVE_COMMONS_LICENSE_NAME, 
Rat.CREATIVE_COMMONS_LICENSE_TEXT_PASSERA),

Review comment:
       This isn't a big deal, but for alignment in the rat report (in 
target/rat.txt), the first part of this tuple is preferred to be five 
characters. So `MIT` followed by two spaces. And then for the Creative Commons 
CC0, probably `CC0` again with two spaces, is reasonable.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to