Home
last modified time | relevance | path

Searched full:ktfmt (Results 1 – 25 of 93) sorted by relevance

1234

/external/ktfmt/
DREADME.md1 …(https://github.com/facebookincubator/ktfmt/workflows/build/badge.svg)](https://github.com/faceboo…
3 # ktfmt chapter
5 `ktfmt` is a program that pretty-prints (formats) Kotlin code, based on [google-java-format](https:…
7 **Note** that `ktfmt` still has some rough edges which we're constantly working on fixing.
13 |Before Formatting| Formatted by `ktfmt`|
15 | ![Original](docs/images/before.png) | ![ktfmt](docs/images/ktfmt.png) |
28 [ktfmt IntelliJ plugin](https://plugins.jetbrains.com/plugin/14912-ktfmt)
31 for the `ktfmt` plugin, and click the `Install` button.
34 to `File→Settings...→ktfmt Settings` (or `IntelliJ
35 IDEA→Preferences...→Editor→ktfmt Settings` on macOS) and
[all …]
Dprepare_upgrade.py18 """Script to prepare an update to a new version of ktfmt."""
28 tmp_dir = "/tmp/ktfmt"
30 jar_path = os.path.join(tmp_dir, "framework/ktfmt.jar")
36 description="Prepare a repository for the upgrade of ktfmt to a new version."
41 help="The build ID of aosp-build-tools-release with the new version of ktfmt"
61 print("Preparing upgrade of ktfmt from build", build_id)
66 print("Downloading ktfmt.jar from aosp-build-tools-release")
132 includes_line = [line for line in f if "ktfmt.py" in line][0].split(" ")
153 f"{build_top}/external/ktfmt/generate_includes_file.py",
171 Regenerate include file for ktfmt upgrade
[all …]
Dgenerate_includes_file.py18 """Script to generate an include file that can be passed to ktfmt.py.
22 currently don't follow ktfmt format. This way, we can easily start formatting
34 'Generate an include file that can be passed to ktfmt.py')
62 # Check all files with ktfmt.
68 '../../prebuilts/build-tools/common/framework/ktfmt.jar'))
86 print('Error running ktfmt')
Dpom.xml7 <artifactId>ktfmt-parent</artifactId>
11 <name>Ktfmt Parent</name>
13 <url>https://github.com/facebookincubator/ktfmt</url>
27 <connection>scm:git:https://github.com/facebookincubator/ktfmt.git</connection>
28 <developerConnection>scm:git:git@github.com:facebookincubator/ktfmt.git</developerConnection>
29 <url>https://github.com/facebookincubator/ktfmt.git</url>
Dktfmt.py44 help='The path to the ktfmt jar.'
92 # No need to start ktfmt if there are no files to check/format.
99 ktfmt_jar = args.jar if args.jar else os.path.join(dir, 'ktfmt.jar')
116 'Note: If you are using the Android Studio ktfmt plugin, make sure to select the '
117 'Kotlinlang style in \'Editor > ktfmt Settings\'.\n')
130 print('Error running ktfmt')
DMETADATA1 name: "ktfmt"
8 value: "https://github.com/facebookincubator/ktfmt.git"
DRELEASING.md1 # Releasing a New `ktfmt` Version
7 3. TODO: also automate website generation (https://facebookincubator.github.io/ktfmt/) and the AWS …
/external/ktfmt/ktfmt_idea_plugin/src/main/resources/META-INF/
Dplugin.xml1 <idea-plugin url="https://github.com/facebookincubator/ktfmt/tree/main/ktfmt_idea_plugin">
3 <name>ktfmt</name>
4 <vendor url="https://github.com/facebookincubator/ktfmt">Facebook</vendor>
6 …<description>ktfmt is a program that reformats Kotlin source code to comply with the common commun…
13 <listener class="com.facebook.ktfmt.intellij.InitialConfigurationProjectManagerListener"
15 <listener class="com.facebook.ktfmt.intellij.KtfmtInstaller"
20 <projectConfigurable instance="com.facebook.ktfmt.intellij.KtfmtConfigurable"
22 displayName="ktfmt Settings"
24 <projectService serviceImplementation="com.facebook.ktfmt.intellij.KtfmtSettings"/>
/external/ktfmt/website/
Dindex.html9 <title>ktfmt - the Kotlin code formatter</title>
23 <a id="gh-link" href="https://github.com/facebookincubator/ktfmt"
37 ktfmt
60 href="https://github.com/facebookincubator/ktfmt"
74 href="https://search.maven.org/artifact/com.facebook/ktfmt/{{version}}/jar"
90 <code>ktfmt</code> is a program that pretty-prints (formats)
122 …A ktfmt plugin that augments the Reformat Code action (<code>⌥⌘L</code>) is available from JetBrai…
124 …<a class="btn btn-info" href="https://plugins.jetbrains.com/plugin/14912-ktfmt" target="_blank">In…
129 href="https://github.com/diffplug/spotless/tree/main/plugin-gradle#ktfmt"
139 spotless { kotlin { ktfmt('{{version}}').kotlinlangStyle() } }
[all …]
/external/ktfmt/core/src/main/java/com/facebook/ktfmt/kdoc/
DKDocWriter.kt20 package com.facebook.ktfmt.kdoc
22 import com.facebook.ktfmt.kdoc.KDocToken.Type.CODE_BLOCK_MARKER
23 import com.facebook.ktfmt.kdoc.KDocToken.Type.HEADER_OPEN_TAG
24 import com.facebook.ktfmt.kdoc.KDocToken.Type.LIST_ITEM_OPEN_TAG
25 import com.facebook.ktfmt.kdoc.KDocToken.Type.PARAGRAPH_OPEN_TAG
26 import com.facebook.ktfmt.kdoc.KDocWriter.RequestedWhitespace.BLANK_LINE
27 import com.facebook.ktfmt.kdoc.KDocWriter.RequestedWhitespace.CONDITIONAL_WHITESPACE
28 import com.facebook.ktfmt.kdoc.KDocWriter.RequestedWhitespace.NEWLINE
29 import com.facebook.ktfmt.kdoc.KDocWriter.RequestedWhitespace.NONE
30 import com.facebook.ktfmt.kdoc.KDocWriter.RequestedWhitespace.WHITESPACE
/external/ktfmt/core/src/main/java/com/facebook/ktfmt/format/
DFormatter.kt17 package com.facebook.ktfmt.format in <lambda>()
19 import com.facebook.ktfmt.debughelpers.printOps in <lambda>()
20 import com.facebook.ktfmt.format.FormattingOptions.Style.DROPBOX in <lambda>()
21 import com.facebook.ktfmt.format.FormattingOptions.Style.GOOGLE in <lambda>()
22 import com.facebook.ktfmt.format.RedundantElementRemover.dropRedundantElements in <lambda>()
23 import com.facebook.ktfmt.format.WhitespaceTombstones.indexOfWhitespaceTombstone in <lambda>()
24 import com.facebook.ktfmt.kdoc.Escaping in <lambda>()
25 import com.facebook.ktfmt.kdoc.KDocCommentsHelper in <lambda>()
136 … "ktfmt does not support code which contains one of {\\u0003, \\u0004, \\u0005} character" + in <lambda>()
DFormattingOptions.kt17 package com.facebook.ktfmt.format
22 /** ktfmt breaks lines longer than maxWidth. */
49 /** Whether ktfmt should remove imports that are not used. */
/external/ktfmt/ktfmt_idea_plugin/src/main/java/com/facebook/ktfmt/intellij/
DUiFormatterStyle.java17 package com.facebook.ktfmt.intellij;
19 import static com.facebook.ktfmt.format.Formatter.DROPBOX_FORMAT;
20 import static com.facebook.ktfmt.format.Formatter.GOOGLE_FORMAT;
21 import static com.facebook.ktfmt.format.Formatter.KOTLINLANG_FORMAT;
23 import com.facebook.ktfmt.format.FormattingOptions;
DFormatterUtil.java17 package com.facebook.ktfmt.intellij;
19 import static com.facebook.ktfmt.format.Formatter.format;
21 import com.facebook.ktfmt.format.ParseError;
33 * Formats 'code' using ktfmt.
DKtfmtConfigurable.java17 package com.facebook.ktfmt.intellij;
19 import com.facebook.ktfmt.intellij.KtfmtSettings.EnabledState;
52 return "ktfmt.settings"; in getId()
64 return "ktfmt Settings"; in getDisplayName()
133 enable.setText("Enable ktfmt"); in $$$setupUI$$$()
DInitialConfigurationProjectManagerListener.java17 package com.facebook.ktfmt.intellij;
29 private static final String NOTIFICATION_TITLE = "Enable ktfmt";
49 "The ktfmt plugin is disabled by default. " in displayNewUserNotification()
/external/ktfmt/core/src/main/java/com/facebook/ktfmt/cli/
DParsedArgs.kt17 package com.facebook.ktfmt.cli
19 import com.facebook.ktfmt.format.Formatter
20 import com.facebook.ktfmt.format.FormattingOptions
24 /** ParsedArgs holds the arguments passed to ktfmt on the command-line, after parsing. */
49 /** parseOptions parses command-line arguments passed to ktfmt. */
DMain.kt17 package com.facebook.ktfmt.cli
19 import com.facebook.ktfmt.format.Formatter
20 import com.facebook.ktfmt.format.ParseError
57 … "Error: '-', which causes ktfmt to read from stdin, should not be mixed with file name") in expandArgsToFileNames()
73 …"Usage: ktfmt [--dropbox-style | --google-style | --kotlinlang-style] [--dry-run] [--set-exit-if-c… in run()
74 err.println("Or: ktfmt @file") in run()
/external/ktfmt/core/src/test/java/com/facebook/ktfmt/testutil/
DKtfmtTruth.kt17 package com.facebook.ktfmt.testutil in <lambda>()
19 import com.facebook.ktfmt.debughelpers.PrintAstVisitor in <lambda>()
20 import com.facebook.ktfmt.format.Formatter in <lambda>()
21 import com.facebook.ktfmt.format.FormattingOptions in <lambda>()
22 import com.facebook.ktfmt.format.Parser in <lambda>()
/external/ktfmt/online_formatter/
DREADME.md1 # AWS Lambda to format Kotlin code using ktfmt
15 …rs, one with the `com.facebook.ktfmt.onlineformatter` package, and the other with all of its depen…
Dformat.yaml9 Handler: 'com.facebook.ktfmt.onlineformatter.Handler::handleRequest'
25 LayerName: ktfmt-lib
26 Description: Dependencies for ktfmt
Dbuild_and_deploy.sh22 ARTIFACT_BUCKET=ktfmt-online-formatter-lambda
25 aws cloudformation deploy --template-file out.yml --stack-name ktfmt --capabilities CAPABILITY_NAME…
/external/ktfmt/online_formatter/src/main/kotlin/
Dmain.kt17 package com.facebook.ktfmt.onlineformatter
22 import com.facebook.ktfmt.cli.ParsedArgs
23 import com.facebook.ktfmt.format.Formatter
/external/ktfmt/.github/workflows/
Dbuild_and_test.yml18 name: Build ktfmt on Java ${{ matrix.java }}
27 - name: Build ktfmt
/external/ktfmt/ktfmt_idea_plugin/
DDEVELOPING.md19 ktfmt/ktfmt_idea_plugin $ ./gradlew runIde
22 …th it. Don't forget to enable the plugin. Easiest way: Cmd-shift-A, type 'ktfmt', look for Prefere…

1234