https://github.com/Miha-x64/Mikes_IDEA_extensions
IntelliJ IDEA: missing parts.
https://github.com/Miha-x64/Mikes_IDEA_extensions
hacktoberfest inspections intellij-plugin
Last synced: 5 months ago
JSON representation
IntelliJ IDEA: missing parts.
- Host: GitHub
- URL: https://github.com/Miha-x64/Mikes_IDEA_extensions
- Owner: Miha-x64
- License: apache-2.0
- Created: 2019-07-01T19:51:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-11T18:27:47.000Z (10 months ago)
- Last Synced: 2025-04-07T23:41:24.108Z (6 months ago)
- Topics: hacktoberfest, inspections, intellij-plugin
- Language: Kotlin
- Homepage:
- Size: 652 KB
- Stars: 36
- Watchers: 4
- Forks: 8
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Mike's IDEA extensions
[](https://plugins.jetbrains.com/plugin/12690-mike-s-idea-extensions/)
[](https://plugins.jetbrains.com/plugin/12690-mike-s-idea-extensions/)Code quality goodifier, RAM saver, performance watcher, mood upgrader, vector drawable optimizer, color previewer.
UAST (Java + Kotlin) inspections
- Atomic can be replaced with volatile
- Allocation should be cached (new Gson(), new OkHttpClient())
-
BigDecimal|BigInteger
instantiation can be replaced with constant by stokito -
(BigDecimal|BigInteger).compareTo(ZERO)
can be replaced withsignum()
by stokito
Kotlin inspections
- Heavyweight property delegation
- Declaration name is Java keyword
- Inline function leaks anonymous declaration which will be inlined to the call-site if called from another module
- Anonymous function won't be inlined;
function cannot be inlined if it is a receiver of an extension function -
Nullable argument to string concatenationshould be re-implemented in more reliable way - Boxed primitive array allocation
Android inspections
-
<include layout="?themeAttribute">
requires Marshmallow -
<drawable android:tint>
requires Lollipop -
<layer-list><item android:gravity>
requires Marshmallow -
@TargetApi
should be replaced with@RequiresApi
- Use of reflective
ObjectAnimator
/PropertyValuesHolder
- Use of attributes like
android.R.attr.enabled
in context where state attributes expected, likeandroid.R.attr.state_enabled
-
Color.parseColor(<constant expression>)
should be replaced with an integer literal - Useless resource element
- Drawables: single-item layer-lists, single stateless item selectors, insetless insets, empty shapes
- Vector drawables: empty paths and clip-paths, invisible paths, suboptimal paths, useless clip-paths and groups, attributes with no effect
- Animations and animators: empty and single-element sets
- Layouts: overridden attributes in (layout_margin|padding)(Left|Top|Right|Bottom|Start|End|Horizontal|Vertical|*)
- Android utility methods should be replaced with Kotlin extensions
-
setOnClickListener
doesn't work onRecyclerView
, onVideoView
before API 26 - Kotlin Android Extensions are deprecated
- Drawable subclass should override
getConstantState()
-
Activity#onCreate(, PersistableBundle)
will highly likely not be called -
<AnyScrollableView>
should have an ID to save its scroll position
Editor tweaks
- Inlay hints when upcasting to interface, e. g.
putExtra(listas Serializable
) - Inlay hints when overriding an interface method, e. g.
@Overridefrom Runnable
,
override funRunnable.
run() - Inlay hints for vararg array allocation:
String.format("%d",new[]{
1}
);
maxOf(1,*[
2, 3, 4]
) - ARGB Color swatches in gutter, folding int literals to
#[AA]RRGGBB
, color picker for Android, pasting CSS colors as int literals - Backing property folding for Kotlin
- Live templates for SVG and Android Vector Drawable pathData
- Live templates for implementing
Property
forObjectAnimator
[Plugin page on JetBrains marketplace](https://plugins.jetbrains.com/plugin/12690-mike-s-idea-extensions)