From 4084167269982aab9965800ce5f40eab0decd1fb Mon Sep 17 00:00:00 2001 From: Will Kwon Date: Wed, 26 May 2021 10:57:02 -0700 Subject: [PATCH 1/7] Add support for settings repository --- install.bat | 3 +++ install.sh | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/install.bat b/install.bat index e1ffa85..884691c 100644 --- a/install.bat +++ b/install.bat @@ -7,6 +7,9 @@ setlocal enableDelayedExpansion for /D %%i in ("%userprofile%"\.AndroidStudio*) do call :copy_config "%%i" for /D %%i in ("%userprofile%"\.IdeaIC*) do call :copy_config "%%i" for /D %%i in ("%userprofile%"\.IntelliJIdea*) do call :copy_config "%%i" +for /D %%i in ("%userprofile%"\.AndroidStudio*\settingsRepository\repository) do call :copy_config "%%i" +for /D %%i in ("%userprofile%"\.IdeaIC*\settingsRepository\repository) do call :copy_config "%%i" +for /D %%i in ("%userprofile%"\.IntelliJIdea*\settingsRepository\repository) do call :copy_config "%%i" echo. echo Restart IntelliJ and/or AndroidStudio, go to preferences, and apply 'Square' or 'SquareAndroid'. diff --git a/install.sh b/install.sh index 9f826a2..9e08c77 100755 --- a/install.sh +++ b/install.sh @@ -8,12 +8,14 @@ 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 \ + $HOME/.AndroidStudio*/config \ + $HOME/Library/Application\ Support/JetBrains/IntelliJIdea* \ $HOME/Library/Application\ Support/Google/AndroidStudio* \ - $HOME/Library/Application\ Support/JetBrains/IdeaIC* + $HOME/Library/Application\ Support/JetBrains/IdeaIC* \ + $HOME/Library/Application\ Support/Google/AndroidStudio*/settingsRepository/repository \ + $HOME/Library/Application\ Support/JetBrains/IdeaIC*/settingsRepository/repository do if [[ -d "$i" ]]; then # Install codestyles From d06cd93bc67963bec65de64eaf212d73f7365d89 Mon Sep 17 00:00:00 2001 From: Thomas Mahoney Date: Wed, 9 Jun 2021 15:43:16 -0400 Subject: [PATCH 2/7] add SUGGEST_NULLABLE_ANNOTATIONS inspection add ConstantConditions.SUGGEST_NULLABLE_ANNOTATIONS to inspections. This inspection flags code that mixes `@Nullable` values and non-`@Nullable` params. Such code is likely erroneous and a common place for NPEs to hide. --- configs/inspection/Square.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/inspection/Square.xml b/configs/inspection/Square.xml index 361afca..cdbff23 100644 --- a/configs/inspection/Square.xml +++ b/configs/inspection/Square.xml @@ -1,6 +1,9 @@ From f2b81b1d87f6c855bed55dae296bddb9bd587dd0 Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Fri, 22 Jul 2022 10:08:57 -0700 Subject: [PATCH 3/7] Exclude property access inspections on assertj assertions due to side-effects --- configs/inspection/Square.xml | 44 +++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/configs/inspection/Square.xml b/configs/inspection/Square.xml index cdbff23..a87576b 100644 --- a/configs/inspection/Square.xml +++ b/configs/inspection/Square.xml @@ -1,10 +1,46 @@ - - + - + + + + From 1af1c63dc788a3eba36c69ccabadf17184634eb5 Mon Sep 17 00:00:00 2001 From: Kirill Zhukov Date: Tue, 16 Aug 2022 21:35:28 -0700 Subject: [PATCH 4/7] Fix trailing commas configuration - KTIJ-22516. ALLOW_TRAILING_COMMA configuration does not currently get picked up by IJ/AS, it only works if it's set up using legacy `JetCodeStyleSettings` block. See https://youtrack.jetbrains.com/issue/KTIJ-22516 for more details, enabling trailing commas via `JetCodeStyleSettings` until the IDE bug is fixed. --- configs/codestyles/Square.xml | 2 ++ configs/codestyles/SquareAndroid.xml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configs/codestyles/Square.xml b/configs/codestyles/Square.xml index d7b0a46..ebee07c 100644 --- a/configs/codestyles/Square.xml +++ b/configs/codestyles/Square.xml @@ -77,6 +77,8 @@