Skip to content

Commit a8d51e9

Browse files
committed
feat: Forcing ANSI output by using the configuration from createProcessHandler and using it in a different KillableProcessHandler
1 parent 28ec3fb commit a8d51e9

17 files changed

+301
-310
lines changed

.editorconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ ij_java_for_statement_wrap = normal
113113
ij_java_generate_final_locals = false
114114
ij_java_generate_final_parameters = false
115115
ij_java_if_brace_force = always
116-
ij_java_imports_layout = $*,|,*
116+
ij_java_imports_layout = $*, |, *
117117
ij_java_indent_case_from_switch = true
118118
ij_java_insert_inner_class_imports = true
119119
ij_java_insert_override_annotation = true
@@ -611,7 +611,7 @@ ij_kotlin_wrap_first_method_in_call_chain = false
611611

612612
[{*.yaml,*.yml}]
613613
ij_yaml_keep_indents_on_empty_lines = false
614-
ij_yaml_keep_line_breaks = true
615-
ij_yaml_space_before_colon = true
616-
ij_yaml_spaces_within_braces = true
617-
ij_yaml_spaces_within_brackets = true
614+
ij_yaml_keep_line_breaks = false
615+
ij_yaml_space_before_colon = false
616+
ij_yaml_spaces_within_braces = false
617+
ij_yaml_spaces_within_brackets = false

.github/workflows/build.yml

Lines changed: 98 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -12,165 +12,157 @@
1212
#
1313
## JBIJPPTPL
1414

15-
name: Build
16-
on:
15+
name : Build
16+
on :
1717
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)
18-
push:
19-
branches: [main]
18+
push :
19+
branches : [ main ]
2020
# Trigger the workflow on any pull request
21-
pull_request:
21+
pull_request :
2222

23-
jobs:
23+
jobs :
2424

2525
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
2626
# Run verifyPlugin, IntelliJ Plugin Verifier, and test Gradle tasks
2727
# Build plugin and provide the artifact for the next workflow jobs
28-
build:
29-
name: Build
30-
runs-on: ubuntu-latest
31-
outputs:
32-
version: ${{ steps.properties.outputs.version }}
33-
changelog: ${{ steps.properties.outputs.changelog }}
34-
steps:
28+
build :
29+
name : Build
30+
runs-on : ubuntu-latest
31+
outputs :
32+
version : ${{ steps.properties.outputs.version }}
33+
changelog : ${{ steps.properties.outputs.changelog }}
34+
steps :
3535

3636
# Free GitHub Actions Environment Disk Space
37-
- name: Maximize Build Space
38-
run: |
37+
- name : Maximize Build Space
38+
run : |
3939
sudo rm -rf /usr/share/dotnet
4040
sudo rm -rf /usr/local/lib/android
4141
sudo rm -rf /opt/ghc
4242
4343
# Check out current repository
44-
- name: Fetch Sources
45-
uses: actions/checkout@v3.3.0
44+
- name : Fetch Sources
45+
uses : actions/checkout@v3
4646

4747
# Validate wrapper
48-
- name: Gradle Wrapper Validation
49-
uses: gradle/wrapper-validation-action@v1.0.6
48+
- name : Gradle Wrapper Validation
49+
uses : gradle/wrapper-validation-action@v1.0.6
5050

5151
# Setup Java 11 environment for the next steps
52-
- name: Setup Java
53-
uses: actions/setup-java@v3
54-
with:
55-
distribution: zulu
56-
java-version: 11
52+
- name : Setup Java
53+
uses : actions/setup-java@v3
54+
with :
55+
distribution : zulu
56+
java-version : 11
5757

5858
# Set environment variables
59-
- name: Export Properties
60-
id: properties
61-
shell: bash
62-
run: |
59+
- name : Export Properties
60+
id : properties
61+
shell : bash
62+
run : |
6363
PROPERTIES="$(./gradlew properties --console=plain -q)"
6464
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
6565
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
6666
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
67-
CHANGELOG="${CHANGELOG//'%'/'%25'}"
68-
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
69-
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
7067
71-
echo "::set-output name=version::$VERSION"
72-
echo "::set-output name=name::$NAME"
73-
echo "::set-output name=changelog::$CHANGELOG"
74-
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
68+
echo "version=$VERSION" >> $GITHUB_OUTPUT
69+
echo "name=$NAME" >> $GITHUB_OUTPUT
70+
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
71+
72+
echo "changelog<<EOF" >> $GITHUB_OUTPUT
73+
echo "$CHANGELOG" >> $GITHUB_OUTPUT
74+
echo "EOF" >> $GITHUB_OUTPUT
7575
7676
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
7777
78-
# Run tests
79-
# - name: Run Tests
80-
# run: ./gradlew check
81-
82-
# Collect Tests Result of failed tests
83-
# - name: Collect Tests Result
84-
# if: ${{ failure() }}
85-
# uses: actions/upload-artifact@v3
86-
# with:
87-
# name: tests-result
88-
# path: ${{ github.workspace }}/build/reports/tests
89-
90-
# Upload Kover report to CodeCov
91-
# - name: Upload Code Coverage Report
92-
# uses: codecov/codecov-action@v3
93-
# with:
94-
# files: ${{ github.workspace }}/build/reports/kover/xml/report.xml
95-
# fail_ci_if_error: false
78+
# # Run tests
79+
# - name: Run Tests
80+
# run: ./gradlew check
81+
#
82+
# # Collect Tests Result of failed tests
83+
# - name: Collect Tests Result
84+
# if: ${{ failure() }}
85+
# uses: actions/upload-artifact@v3
86+
# with:
87+
# name: tests-result
88+
# path: ${{ github.workspace }}/build/reports/tests
89+
#
90+
# # Upload Kover report to CodeCov
91+
# - name: Upload Code Coverage Report
92+
# uses: codecov/codecov-action@v3
93+
# with:
94+
# files: ${{ github.workspace }}/build/reports/kover/xml/report.xml
9695

9796
# Cache Plugin Verifier IDEs
98-
- name: Setup Plugin Verifier IDEs Cache
99-
uses: actions/cache@v3
100-
with:
101-
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
102-
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
97+
- name : Setup Plugin Verifier IDEs Cache
98+
uses : actions/cache@v3
99+
with :
100+
path : ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
101+
key : plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
103102

104103
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
105-
- name: Run Plugin Verification tasks
106-
run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
104+
- name : Run Plugin Verification tasks
105+
run : ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
107106

108107
# Collect Plugin Verifier Result
109-
- name: Collect Plugin Verifier Result
110-
if: ${{ always() }}
111-
uses: actions/upload-artifact@v3
112-
with:
113-
name: pluginVerifier-result
114-
path: ${{ github.workspace }}/build/reports/pluginVerifier
108+
- name : Collect Plugin Verifier Result
109+
if : ${{ always() }}
110+
uses : actions/upload-artifact@v3
111+
with :
112+
name : pluginVerifier-result
113+
path : ${{ github.workspace }}/build/reports/pluginVerifier
115114

116115
# Run Qodana inspections
117-
- name: Qodana - Code Inspection
118-
uses: JetBrains/qodana-action@main
119-
env:
120-
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
121-
122-
# Add Quodona report to Github Codescanning
123-
- uses : github/codeql-action/upload-sarif@v2
124-
with :
125-
sarif_file : ${{ runner.temp }}/qodana/results/qodana.sarif.json
116+
- name : Qodana - Code Inspection
117+
uses : JetBrains/qodana-action@v2022.3.4
126118

127119
# Prepare plugin archive content for creating artifact
128-
- name: Prepare Plugin Artifact
129-
id: artifact
130-
shell: bash
131-
run: |
120+
- name : Prepare Plugin Artifact
121+
id : artifact
122+
shell : bash
123+
run : |
132124
cd ${{ github.workspace }}/build/distributions
133125
FILENAME=`ls *.zip`
134126
unzip "$FILENAME" -d content
135127
136-
echo "::set-output name=filename::${FILENAME:0:-4}"
128+
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
137129
138130
# Store already-built plugin as an artifact for downloading
139-
- name: Upload artifact
140-
uses: actions/upload-artifact@v3
141-
with:
142-
name: ${{ steps.artifact.outputs.filename }}
143-
path: ./build/distributions/content/*/*
131+
- name : Upload artifact
132+
uses : actions/upload-artifact@v3
133+
with :
134+
name : ${{ steps.artifact.outputs.filename }}
135+
path : ./build/distributions/content/*/*
144136

145137
# Prepare a draft release for GitHub Releases page for the manual verification
146138
# If accepted and published, release workflow would be triggered
147-
releaseDraft:
148-
name: Release Draft
149-
if: github.event_name != 'pull_request'
150-
needs: build
151-
runs-on: ubuntu-latest
152-
permissions:
153-
contents: write
154-
steps:
139+
releaseDraft :
140+
name : Release Draft
141+
if : github.event_name != 'pull_request'
142+
needs : build
143+
runs-on : ubuntu-latest
144+
permissions :
145+
contents : write
146+
steps :
155147

156148
# Check out current repository
157-
- name: Fetch Sources
158-
uses: actions/checkout@v3.3.0
159-
160-
# Remove old release drafts by using the curl request for the available releases with draft flag
161-
- name: Remove Old Release Drafts
162-
env:
163-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
164-
run: |
149+
- name : Fetch Sources
150+
uses : actions/checkout@v3
151+
152+
# Remove old release drafts by using the curl request for the available releases with a draft flag
153+
- name : Remove Old Release Drafts
154+
env :
155+
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
156+
run : |
165157
gh api repos/{owner}/{repo}/releases \
166158
--jq '.[] | select(.draft == true) | .id' \
167159
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{}
168160
169-
# Create new release draft - which is not publicly visible and requires manual acceptance
170-
- name: Create Release Draft
171-
env:
172-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173-
run: |
161+
# Create a new release draft which is not publicly visible and requires manual acceptance
162+
- name : Create Release Draft
163+
env :
164+
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
165+
run : |
174166
gh release create v${{ needs.build.outputs.version }} \
175167
--draft \
176168
--title "v${{ needs.build.outputs.version }}" \

0 commit comments

Comments
 (0)