Skip to content

Commit

Permalink
feat: revert to 0.40.0 due to pinterest/ktlint#1195
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Dec 11, 2021
1 parent 7c36b5b commit 218b1e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![ktlint](https://img.shields.io/badge/code%20style-%E2%9D%A4-FF4081.svg)](https://ktlint.github.io/)

Current ktlint version: `0.43.2`
Current ktlint version: ~~0.43.2~~ `0.40.0`

Because `0.43.2` fails on Java 16+: https://github.com/pinterest/ktlint/issues/1195

# Features

Expand Down
Binary file modified resources/ktlint
Binary file not shown.
10 changes: 7 additions & 3 deletions src/__exclude/install.ts → scripts/install.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
yarn tsn src/install
yarn tsn ./scripts/install
*/

import * as fs from 'fs'
import { pipeline } from 'stream'
import { promisify } from 'util'
import got from 'got'
import { ktlintPath } from './paths'
import { ktlintPath } from '../src/paths'

const _pipeline = promisify(pipeline) as any

Expand All @@ -20,7 +20,11 @@ void (async () => {
return
}

const ktlintVersion = '0.43.2'
// 0.43.2 sometimes fails with error on Java 16+:
// https://github.com/pinterest/ktlint/issues/1195
// Hence, reverting to 0.40.0
// const ktlintVersion = '0.43.2'
const ktlintVersion = '0.40.0'
console.log(`downloading ktlint ${ktlintVersion} from github, may take some time...`)

const url = `https://github.com/pinterest/ktlint/releases/download/${ktlintVersion}/ktlint`
Expand Down

0 comments on commit 218b1e7

Please sign in to comment.