jsoref commented on code in PR #4877:
URL: https://github.com/apache/hive/pull/4877#discussion_r1398316478


##########
.github/actions/spelling/allow.txt:
##########
@@ -0,0 +1,10 @@
+deserializers

Review Comment:
   most of the items in here are needed to enable a smooth upgrade from the 
current version to this new version



##########
.github/actions/spelling/patterns.txt:
##########
@@ -1,38 +1,86 @@
 # See 
https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
 
-# stackexchange -- https://stackexchange.com/feeds/sites
-\b(?:askubuntu|serverfault|stack(?:exchange|overflow)|superuser).com/questions/\d+/[a-z-]+
-# w3
-\bw3\.org/[-0-9a-zA-Z/#.]+
-# mvnrepository.com
-\bmvnrepository\.com/[-0-9a-z./]+
-# URL escaped characters
-\%[0-9A-F]{2}
-# sha-1
-"[0-9a-f]{40}"
+# Automatically suggested patterns
+# hit-count: 145 file-count: 14
 # hex digits including css/html color classes:
-(?:[\\0][xX]|\\u|[uU]\+|#|\%23)[0-9a-fA-FgGrR]{2,}[uU]?[lL]{0,2}\b
+(?:[\\0][xX]|\\u|[uU]\+|#x?|\%23)[0-9_a-fA-FgGrR]*?[a-fA-FgGrR]{2,}[0-9_a-fA-FgGrR]*(?:[uUlL]{0,3}|[iu]\d+)\b
+
+# hit-count: 14 file-count: 11
+# https/http/file urls
+(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]
+
+# hit-count: 13 file-count: 4
+# in check-spelling@v0.0.22+, printf markers aren't automatically consumed
+# printf markers
+(?<!\\)\\[nrt](?=[a-z]{2,})
+
+# hit-count: 11 file-count: 4
+# base64 encoded content
+([`'"])[-a-zA-Z=;:/0-9+]+?[0-9]+?[-a-zA-Z=;:/0-9+]+=\g{-1}
+
+# hit-count: 10 file-count: 8
+# IServiceProvider / isAThing
+\b(?:I|isA)(?=(?:[A-Z][a-z]{2,})+(?:[A-Z]|\b))
+
+# hit-count: 4 file-count: 3
+# hex runs
+\b[0-9a-fA-F]{16,}\b
+
+# hit-count: 4 file-count: 2
 # uuid:
-[{"'][0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}['"}]
-# curl arguments
-\b(?:)curl(?:\s+-[a-zA-Z]+)+
-# tar arguments
-\b(?:)tar(?:\s+-[a-zA-Z]+|\s[a-z]+)+
+\b[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\b
+
+# hit-count: 2 file-count: 1
+# sha-... -- uses a fancy capture
+(\\?['"]|&quot;)[0-9a-f]{40,}\g{-1}
+
+# hit-count: 1 file-count: 1
+# Time Zones
+\b(?:Africa|Atlantic|America|Antarctica|Asia|Australia|Europe|Indian|Pacific)(?:/\w+)+
+
 # decode
 \.decode\("[0-9a-zA-Z]+"
-#
-"[0-9a-f]{80,}"
+
 # pom.xml
-<(additionalClasspathElement|arg|(?:artifact|group)Id|id|installDir|jvmArgs|mainClass|shadedClassifierName|template(?:Base|Source|Output)Dir|version)>[^<]*</\1>
+<(additionalClasspathElement|arg|(?:artifact|group)Id|id|installDir|jvmArgs|mainClass|shadedClassifierName|template(?:Base|Source|Output)Dir|version)>[^<]*</\g{-1}>

Review Comment:
   the `\1` notation is very fragile, the `\g{-1}` notation will find the most 
recent match instead of the first match (the 
`(\\?['"]|&quot;)[0-9a-f]{40,}\g{-1}` rule above shifted what `\1` referenced)



##########
.github/workflows/spelling.yml:
##########
@@ -1,69 +1,172 @@
 name: Spell checking
+
+# Comment management is handled through a secondary job, for details see:
+# 
https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions
+#
+# `jobs.comment-push` runs when a push is made to a repository and the 
`jobs.spelling` job needs to make a comment
+#   (in odd cases, it might actually run just to collapse a comment, but 
that's fairly rare)
+#   it needs `contents: write` in order to add a comment.
+#
+# `jobs.comment-pr` runs when a pull_request is made to a repository and the 
`jobs.spelling` job needs to make a comment
+#   or collapse a comment (in the case where it had previously made a comment 
and now no longer needs to show a comment)
+#   it needs `pull-requests: write` in order to manipulate those comments.
+
+# Updating pull request branches is managed via comment handling.
+# For details, see: 
https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list
+#
+# These elements work together to make it happen:
+#
+# `on.issue_comment`
+#   This event listens to comments by users asking to update the metadata.
+#
+# `jobs.update`
+#   This job runs in response to an issue_comment and will push a new commit
+#   to update the spelling metadata.
+#
+# `with.experimental_apply_changes_via_bot`
+#   Tells the action to support and generate messages that enable it
+#   to make a commit to update the spelling metadata.
+#
+# `with.ssh_key`
+#   In order to trigger workflows when the commit is made, you can provide a
+#   secret (typically, a write-enabled github deploy key).
+#
+#   For background, see: 
https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key
+
+# Sarif reporting
+#
+# Access to Sarif reports is generally restricted (by GitHub) to members of 
the repository.
+#
+# Requires enabling `security-events: write`
+# and configuring the action with `use_sarif: 1`
+#
+#   For information on the feature, see: 
https://github.com/check-spelling/check-spelling/wiki/Feature:-Sarif-output
+
+# Minimal workflow structure:
+#
+# on:
+#   push:
+#     ...
+#   pull_request_target:
+#     ...
+# jobs:
+#   # you only want the spelling job, all others should be omitted
+#   spelling:
+#     # remove `security-events: write` and `use_sarif: 1`
+#     # remove `experimental_apply_changes_via_bot: 1`
+#     ... otherwise adjust the `with:` as you wish
+
 on:
   push:
-    branches: ["**"]
-    tags-ignore: ["**"]
+    branches:
+    - "**"
+    tags-ignore:
+    - "**"
   pull_request_target:
+    branches:
+    - "**"
+    types:
+    - 'opened'
+    - 'reopened'
+    - 'synchronize'
+  issue_comment:
+    types:
+    - 'created'
 
 jobs:
   spelling:
     name: Spell checking
     permissions:
       contents: read
       pull-requests: read
+      actions: read
+      security-events: write
     outputs:
-      internal_state_directory: ${{ 
steps.spelling.outputs.internal_state_directory }}
+      followup: ${{ steps.spelling.outputs.followup }}
     runs-on: ubuntu-latest
-    if: "contains(github.event_name, 'pull_request') || github.event_name == 
'push'"
+    if: ${{ contains(github.event_name, 'pull_request') || github.event_name 
== 'push' }}
     concurrency:
       group: spelling-${{ github.event.pull_request.number || github.ref }}
       # note: If you use only_check_changed_files, you do not want 
cancel-in-progress
       cancel-in-progress: true
     steps:
-    - name: checkout-merge
-      if: "contains(github.event_name, 'pull_request')"
-      uses: actions/checkout@v2
-      with:
-        ref: refs/pull/${{github.event.pull_request.number}}/merge
-    - name: checkout
-      if: github.event_name == 'push'
-      uses: actions/checkout@v2
     - name: check-spelling
       id: spelling
-      uses: check-spelling/check-spelling@v0.0.20-alpha3
+      uses: check-spelling/check-spelling@v0.0.22
       with:
-        suppress_push_for_open_pull_request: 1
+        suppress_push_for_open_pull_request: ${{ github.actor != 
'dependabot[bot]' && 1 }}

Review Comment:
   This will enable dependabot to properly report if the cspell dictionaries 
won't behave w/ an update



##########
serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryUtils.java:
##########
@@ -128,7 +128,7 @@ public String toString() {
    * For void, boolean, byte, short, int, long, float and double, there is no
    * offset and the size is fixed. For string, map, list, struct, the first 
four
    * bytes are used to store the size. So the offset is 4 and the size is
-   * computed by concating the first four bytes together. The first four bytes
+   * computed by concatenating the first four bytes together. The first four 
bytes

Review Comment:
   this term is used in a number of places in this repository...



##########
.github/workflows/spelling.yml:
##########
@@ -1,69 +1,172 @@
 name: Spell checking
+
+# Comment management is handled through a secondary job, for details see:
+# 
https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions
+#
+# `jobs.comment-push` runs when a push is made to a repository and the 
`jobs.spelling` job needs to make a comment
+#   (in odd cases, it might actually run just to collapse a comment, but 
that's fairly rare)
+#   it needs `contents: write` in order to add a comment.
+#
+# `jobs.comment-pr` runs when a pull_request is made to a repository and the 
`jobs.spelling` job needs to make a comment
+#   or collapse a comment (in the case where it had previously made a comment 
and now no longer needs to show a comment)
+#   it needs `pull-requests: write` in order to manipulate those comments.
+
+# Updating pull request branches is managed via comment handling.
+# For details, see: 
https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list
+#
+# These elements work together to make it happen:
+#
+# `on.issue_comment`
+#   This event listens to comments by users asking to update the metadata.
+#
+# `jobs.update`
+#   This job runs in response to an issue_comment and will push a new commit
+#   to update the spelling metadata.
+#
+# `with.experimental_apply_changes_via_bot`
+#   Tells the action to support and generate messages that enable it
+#   to make a commit to update the spelling metadata.
+#
+# `with.ssh_key`
+#   In order to trigger workflows when the commit is made, you can provide a
+#   secret (typically, a write-enabled github deploy key).
+#
+#   For background, see: 
https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key
+
+# Sarif reporting
+#
+# Access to Sarif reports is generally restricted (by GitHub) to members of 
the repository.
+#
+# Requires enabling `security-events: write`
+# and configuring the action with `use_sarif: 1`
+#
+#   For information on the feature, see: 
https://github.com/check-spelling/check-spelling/wiki/Feature:-Sarif-output
+
+# Minimal workflow structure:
+#
+# on:
+#   push:
+#     ...
+#   pull_request_target:
+#     ...
+# jobs:
+#   # you only want the spelling job, all others should be omitted
+#   spelling:
+#     # remove `security-events: write` and `use_sarif: 1`
+#     # remove `experimental_apply_changes_via_bot: 1`
+#     ... otherwise adjust the `with:` as you wish
+
 on:
   push:
-    branches: ["**"]
-    tags-ignore: ["**"]
+    branches:
+    - "**"
+    tags-ignore:
+    - "**"
   pull_request_target:
+    branches:
+    - "**"
+    types:
+    - 'opened'
+    - 'reopened'
+    - 'synchronize'
+  issue_comment:
+    types:
+    - 'created'
 
 jobs:
   spelling:
     name: Spell checking
     permissions:
       contents: read
       pull-requests: read
+      actions: read
+      security-events: write
     outputs:
-      internal_state_directory: ${{ 
steps.spelling.outputs.internal_state_directory }}
+      followup: ${{ steps.spelling.outputs.followup }}
     runs-on: ubuntu-latest
-    if: "contains(github.event_name, 'pull_request') || github.event_name == 
'push'"
+    if: ${{ contains(github.event_name, 'pull_request') || github.event_name 
== 'push' }}
     concurrency:
       group: spelling-${{ github.event.pull_request.number || github.ref }}
       # note: If you use only_check_changed_files, you do not want 
cancel-in-progress
       cancel-in-progress: true
     steps:
-    - name: checkout-merge
-      if: "contains(github.event_name, 'pull_request')"
-      uses: actions/checkout@v2
-      with:
-        ref: refs/pull/${{github.event.pull_request.number}}/merge
-    - name: checkout
-      if: github.event_name == 'push'
-      uses: actions/checkout@v2
     - name: check-spelling
       id: spelling
-      uses: check-spelling/check-spelling@v0.0.20-alpha3
+      uses: check-spelling/check-spelling@v0.0.22
       with:
-        suppress_push_for_open_pull_request: 1
+        suppress_push_for_open_pull_request: ${{ github.actor != 
'dependabot[bot]' && 1 }}
+        checkout: true
+        check_file_names: 1
         post_comment: 0
-    - name: store-comment
-      if: failure()
-      uses: actions/upload-artifact@v2
-      with:
-        retention-days: 1
-        name: "check-spelling-comment-${{ github.run_id }}"
-        path: |
-          ${{ steps.spelling.outputs.internal_state_directory }}
+        use_magic_file: 1
+        warnings: 
bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check
+        experimental_apply_changes_via_bot: ${{ github.repository_owner != 
'apache' && 1 }}

Review Comment:
   the update feature is disabled for this repository (it'll work in forks)



-- 
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: gitbox-unsubscr...@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to