Skip to content

Commit 76f3191

Browse files
committed
lint: format all files with treefmt
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
1 parent d0cc243 commit 76f3191

221 files changed

Lines changed: 16354 additions & 12605 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
use nix
1+
use nix

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
name: Bug report
33
about: Create a report to help the script authors to improve.
44
title: "[BUG] "
5-
labels: 'Type: Support'
6-
assignees: ''
7-
5+
labels: "Type: Support"
6+
assignees: ""
87
---
98

109
<!--
@@ -19,7 +18,6 @@ Don't forget to use the `@` symbol in-front of the names, like `@pbek`, so they
1918
You will find the authors in the *Script repository*.
2019
-->
2120

22-
2321
#### Script name
2422

2523
#### Script authors

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
name: Feature request
33
about: Suggest an idea for a script.
44
title: "[FEATURE] "
5-
labels: 'Type: Support'
6-
assignees: ''
7-
5+
labels: "Type: Support"
6+
assignees: ""
87
---
98

109
<!--
@@ -19,9 +18,6 @@ Don't forget to use the `@` symbol in-front of the names, like `@pbek`, so they
1918
You will find the authors in the *Script repository*.
2019
-->
2120

22-
23-
24-
2521
#### Script name
2622

2723
#### Script authors

.github/ISSUE_TEMPLATE/support.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
name: Question / Support
33
about: What do you want to ask?
44
title: "[SUPPORT] "
5-
labels: 'Type: Support'
6-
assignees: ''
7-
5+
labels: "Type: Support"
6+
assignees: ""
87
---
98

109
<!--
@@ -19,9 +18,6 @@ Don't forget to use the `@` symbol in-front of the names, like `@pbek`, so they
1918
You will find the authors in the *Script repository*.
2019
-->
2120

22-
23-
24-
2521
#### Script name
2622

2723
#### Script authors

.github/workflows/generate-index.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ name: Generate script metadata index
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66

77
jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- name: Generate index
13-
run: ./.github/workflows/scripts/generate-index.sh
14-
- name: Upload index.json
15-
run: |
16-
gh release upload metadata-index index.json --clobber --repo "$GITHUB_REPOSITORY"
17-
env:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
- uses: actions/checkout@v2
12+
- name: Generate index
13+
run: ./.github/workflows/scripts/generate-index.sh
14+
- name: Upload index.json
15+
run: |
16+
gh release upload metadata-index index.json --clobber --repo "$GITHUB_REPOSITORY"
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/run-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ name: Run tests
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- name: Run tests
15-
run: php ./.github/workflows/scripts/run-tests.php
13+
- uses: actions/checkout@v2
14+
- name: Run tests
15+
run: php ./.github/workflows/scripts/run-tests.php

.github/workflows/scripts/generate-index.sh

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,22 @@ set -euo pipefail
88
TMP_FILE_NAME=/tmp/temp.json
99
RESULT_FILE_NAME=index.json
1010

11-
echo "[" > ${TMP_FILE_NAME}
11+
echo "[" >${TMP_FILE_NAME}
1212

1313
# Search for all files named "info.json" and store their paths in an array
14-
files=( $(find . -name "info.json") )
14+
files=($(find . -name "info.json"))
1515

1616
# Loop through the array of files and concatenate their contents into a new file
17-
for (( i=0; i<${#files[@]}; i++ ))
18-
do
19-
cat "${files[i]}" >> ${TMP_FILE_NAME}
20-
if [ $i -ne $((${#files[@]}-1)) ]
21-
then
22-
echo "," >> ${TMP_FILE_NAME}
17+
for ((i = 0; i < ${#files[@]}; i++)); do
18+
cat "${files[i]}" >>${TMP_FILE_NAME}
19+
if [ $i -ne $((${#files[@]} - 1)) ]; then
20+
echo "," >>${TMP_FILE_NAME}
2321
fi
2422
done
2523

26-
echo "]" >> ${TMP_FILE_NAME}
24+
echo "]" >>${TMP_FILE_NAME}
2725

2826
# Minify json
29-
jq -r tostring < ${TMP_FILE_NAME} > ${RESULT_FILE_NAME}
27+
jq -r tostring <${TMP_FILE_NAME} >${RESULT_FILE_NAME}
3028

3129
echo "Done! Concatenated info.json files can be found in ${RESULT_FILE_NAME}."

.github/workflows/stale.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ permissions:
1010
jobs:
1111
close-issues:
1212
permissions:
13-
issues: write # for actions/stale to close stale issues
14-
pull-requests: write # for actions/stale to close stale PRs
13+
issues: write # for actions/stale to close stale issues
14+
pull-requests: write # for actions/stale to close stale PRs
1515
runs-on: ubuntu-latest
1616
steps:
1717
# https://github.com/marketplace/actions/close-stale-issues
@@ -22,7 +22,7 @@ jobs:
2222
stale-issue-label: "Stale"
2323
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
2424
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
25-
any-of-labels: 'Type: Support,Webpage: Support'
25+
any-of-labels: "Type: Support,Webpage: Support"
2626
days-before-pr-stale: -1
2727
days-before-pr-close: -1
2828
repo-token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# QOwnNotes script repository
22

3-
[Installation](http://www.qownnotes.org/installation) |
4-
[Changelog](https://github.com/pbek/QOwnNotes/blob/develop/CHANGELOG.md) |
5-
[Issues](https://github.com/qownnotes/scripts/issues) |
3+
[Installation](http://www.qownnotes.org/installation) |
4+
[Changelog](https://github.com/pbek/QOwnNotes/blob/develop/CHANGELOG.md) |
5+
[Issues](https://github.com/qownnotes/scripts/issues) |
66
[Releases](https://github.com/pbek/QOwnNotes/releases) |
77
[Documentation](http://docs.qownnotes.org) |
88
[IRC Chat](https://kiwiirc.com/client/irc.freenode.net/#qownnotes) |
@@ -26,7 +26,7 @@ To bring your script into the **script repository** you just have to do the foll
2626
- **add your script** to the folder and remove the `example-script.qml`
2727
- **edit** the **`info.json`** to add your meta data and describe what your script is doing
2828
- you can use [example script info.json](https://jsoneditoronline.org/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fqownnotes%2Fscripts%2Fmaster%2Fexample-script%2Finfo.json) to help you with the json encoding
29-
- if you are not sure which `minAppVersion` the commands you are using needs take the [current version](https://github.com/pbek/QOwnNotes/blob/master/src/version.h) of *QOwnNotes*
29+
- if you are not sure which `minAppVersion` the commands you are using needs take the [current version](https://github.com/pbek/QOwnNotes/blob/master/src/version.h) of _QOwnNotes_
3030
- **commit and push** your changes to your repository
3131
- create a **[pull request](https://help.github.com/articles/creating-a-pull-request/)** to get your script merged into the QOwnNotes script repository
3232

add-multiple-tags/add-multiple-tags.qml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ import QtQml 2.0
44
* This script creates a menu item and a button with which you can add space separated tags to the current note
55
*/
66
QtObject {
7-
/**
8-
* Initializes the custom action
9-
*/
10-
function init() {
11-
// create the menu entry
12-
script.registerCustomAction("addMultipleTags", "Add Multiple tags", "fav", "bookmark-new");
13-
}
147

158
/**
169
* This function is invoked when a custom action is triggered
1710
* in the menu or via button
18-
*
11+
*
1912
* @param identifier string the identifier defined in registerCustomAction
2013
*/
2114
function customActionInvoked(identifier) {
2215
switch (identifier) {
23-
// add tags to the current note
24-
case "addMultipleTags":
25-
var tags = script.inputDialogGetText("Add tags", "Enter tags separated by space", "");
26-
script.log(tags);
27-
var tagsList = tags.split(' ');
28-
var i;
29-
for (i = 0; i < tagsList.length; i++) {
30-
script.tagCurrentNote(tagsList[i]);
31-
}
32-
break;
16+
// add tags to the current note
17+
case "addMultipleTags":
18+
var tags = script.inputDialogGetText("Add tags", "Enter tags separated by space", "");
19+
script.log(tags);
20+
var tagsList = tags.split(' ');
21+
var i;
22+
for (i = 0; i < tagsList.length; i++) {
23+
script.tagCurrentNote(tagsList[i]);
24+
}
25+
break;
3326
}
3427
}
28+
/**
29+
* Initializes the custom action
30+
*/
31+
function init() {
32+
// create the menu entry
33+
script.registerCustomAction("addMultipleTags", "Add Multiple tags", "fav", "bookmark-new");
34+
}
3535
}

0 commit comments

Comments
 (0)