From edfc51e801bf538d661be5484be684bbc3a786df Mon Sep 17 00:00:00 2001 From: Peter Evjan Date: Thu, 21 May 2020 11:09:06 +1000 Subject: [PATCH 01/13] IntelliJ 2020 support The same config files work for IntelliJ 2020, but the location has changed so added that directory. Also quoting the variable derefences since the new path contains a space and it doesn't work without it --- install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index a03a9a1..98a2e1c 100755 --- a/install.sh +++ b/install.sh @@ -8,23 +8,23 @@ CONFIGS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/configs" for i in $HOME/Library/Preferences/IntelliJIdea* \ $HOME/Library/Preferences/IdeaIC* \ $HOME/Library/Preferences/AndroidStudio* \ + $HOME/Library/Application\ Support/JetBrains/IntelliJIdea* \ $HOME/.IntelliJIdea*/config \ $HOME/.IdeaIC*/config \ $HOME/.AndroidStudio*/config do - if [[ -d $i ]]; then - + if [[ -d "$i" ]]; then # Install codestyles - mkdir -p $i/codestyles - cp -frv "$CONFIGS/codestyles"/* $i/codestyles + mkdir -p "$i/codestyles" + cp -frv "$CONFIGS/codestyles"/* "$i/codestyles" # Install inspections - mkdir -p $i/inspection - cp -frv "$CONFIGS/inspection"/* $i/inspection + mkdir -p "$i/inspection" + cp -frv "$CONFIGS/inspection"/* "$i/inspection" # Install options ("Exclude from Import and Completion") - mkdir -p $i/options - cp -frv "$CONFIGS/options"/* $i/options + mkdir -p "$i/options" + cp -frv "$CONFIGS/options"/* "$i/options" fi done From f621070f011f6356ff1c91d216a34288772d3eaa Mon Sep 17 00:00:00 2001 From: Ralf Wondratschek Date: Tue, 11 Aug 2020 09:59:20 -0700 Subject: [PATCH 02/13] Stop always wrapping chained function calls in Kotlin. The old setting used "Always wrap", the new setting uses "Chop down if long". The Java code style uses "Chop down if long", too. The old setting made code harder to read in many scenarios: // Old assertThat(myList).containsExactly("a", "b", "c") .inOrder() // New assertThat(myList).containsExactly("a", "b", "c").inOrder() // Old if (project.file("src/debug") .exists() || project.file("src/release") .exists() ) { return } // New if (project.file("src/debug").exists() || project.file("src/release").exists()) { return } // Old val string = "The project path is ${ project.path.substring(1) .replace(':', '/') }" // New val string = "The project path is ${project.path.substring(1).replace(':', '/')}" // Old stringList .filter {..} .map { it.trim() .substring(1) } // New stringList .filter {..} .map { it.trim().substring(1) } --- configs/codestyles/Square.xml | 2 +- configs/codestyles/SquareAndroid.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/codestyles/Square.xml b/configs/codestyles/Square.xml index 458ef16..62a867e 100644 --- a/configs/codestyles/Square.xml +++ b/configs/codestyles/Square.xml @@ -303,7 +303,7 @@