Skip to content

Commit 1e19e56

Browse files
committed
Simplify docstrings linter annotation output now that build_docs.py does it natively
1 parent 6f6b9a9 commit 1e19e56

File tree

3 files changed

+3
-32
lines changed

3 files changed

+3
-32
lines changed

Diff for: .github/workflows/PR.yml

-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ jobs:
6767
- name: Check for docstring lint failures
6868
run: ./gh_actions_doclint.sh -v
6969

70-
- name: Remove annotations file
71-
run: rm annotations.json
72-
7370
# Update docs and zips
7471
- name: Update docs and zips
7572
run: ./gh_actions_publish.sh

Diff for: Source/Seal.spoon/init.lua

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
--- * useractions : User defined custom actions
1515
--- * vpn : Connect and disconnect VPNs (currently supports Viscosity and macOS system preferences)A
1616

17+
1718
local obj = {}
1819
obj.__index = obj
1920

@@ -49,6 +50,7 @@ obj.plugin_search_paths = { hs.configdir .. "/seal_plugins", obj.spoonPath }
4950
--- Seal:refreshCommandsForPlugin(plugin_name)
5051
--- Method
5152
--- Refresh the list of commands provided by the given plugin.
53+
--- lol
5254
---
5355
--- Parameters:
5456
--- * plugin_name - the name of the plugin. Should be the name as passed to `loadPlugins()` or `loadPluginFromFile`.

Diff for: gh_actions_doclint.sh

+1-29
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,6 @@ fi
77

88
set -x
99

10-
if [ "$1" == "-v" ]; then
11-
COUNT=$(jq length annotations.json)
12-
if [ "${COUNT}" != "0" ]; then
13-
JSON=$(cat annotations.json)
14-
for row in $(echo "${JSON}" | jq -r '.[] | @base64') ; do
15-
_jq() {
16-
echo ${row} | base64 --decode | jq -r ${1}
17-
}
18-
FILE=$(_jq '.file')
19-
LINE=$(_jq '.line')
20-
TITLE=$(_jq '.title')
21-
MSG=$(_jq '.message')
22-
echo "::error file=${FILE},line=${LINE},title=${TITLE}::${MSG}" >>/dev/stderr
23-
done
24-
exit 1
25-
fi
26-
27-
exit 0
28-
fi
29-
30-
set -eu
31-
3210
# Find the Spoons that have been modified
3311
SPOONS=$(cat "${HOME}/files.json" | jq -r -c '.[] | select(contains(".lua"))' | sed -e 's#^Source/\(.*\).spoon/.*#\1#' | sort | uniq)
3412

@@ -37,13 +15,7 @@ if [ "${SPOONS}" == "" ]; then
3715
exit 0
3816
fi
3917

40-
mkdir -p annotations
41-
4218
while IFS= read -r SPOON ; do
43-
/usr/bin/python3 ./hammerspoon/scripts/docs/bin/build_docs.py -l -o annotations/ -n Source/${SPOON}.spoon
44-
mv annotations/annotations.json "annotations/${SPOON}-annotations.json"
19+
/usr/bin/python3 ./hammerspoon/scripts/docs/bin/build_docs.py -l -o /tmp/ -n Source/${SPOON}.spoon
4520
done <<< "${SPOONS}"
4621

47-
jq -s '[.[][]]' annotations/*.json >annotations.json
48-
rm -rf annotations/
49-

0 commit comments

Comments
 (0)