Browse Source

fix(getting-started-docs): Fix code snippets indentation (#52804)

Priscila Oliveira 1 year ago
parent
commit
ae129994f1

+ 101 - 101
static/app/gettingStartedDocs/java/spring-boot.tsx

@@ -39,22 +39,22 @@ export const steps = ({
             language: 'xml',
             description: <strong>{t('Spring Boot 2')}</strong>,
             code: `
-              <dependency>
-                  <groupId>io.sentry</groupId>
-                  <artifactId>sentry-spring-boot-starter</artifactId>
-                  <version>{{@inject packages.version('sentry.java.spring-boot', '4.0.0') }}</version>
-              </dependency>
+<dependency>
+    <groupId>io.sentry</groupId>
+    <artifactId>sentry-spring-boot-starter</artifactId>
+    <version>{{@inject packages.version('sentry.java.spring-boot', '4.0.0') }}</version>
+</dependency>
           `,
           },
           {
             language: 'xml',
             description: <strong>{t('Spring Boot 3')}</strong>,
             code: `
-            <dependency>
-                <groupId>io.sentry</groupId>
-                <artifactId>sentry-spring-boot-starter-jakarta</artifactId>
-                <version>{{@inject packages.version('sentry.java.spring-boot.jakarta', '6.7.0') }}</version>
-            </dependency>
+<dependency>
+    <groupId>io.sentry</groupId>
+    <artifactId>sentry-spring-boot-starter-jakarta</artifactId>
+    <version>{{@inject packages.version('sentry.java.spring-boot.jakarta', '6.7.0') }}</version>
+</dependency>
         `,
           },
         ],
@@ -95,10 +95,10 @@ export const steps = ({
           <p>{tct('Modify [code:src/main/application.properties]:', {code: <code />})}</p>
         ),
         code: `
-        sentry.dsn=${dsn}
-        # Set traces-sample-rate to 1.0 to capture 100% of transactions for performance monitoring.
-        # We recommend adjusting this value in production.
-        sentry.traces-sample-rate=1.0
+sentry.dsn=${dsn}
+# Set traces-sample-rate to 1.0 to capture 100% of transactions for performance monitoring.
+# We recommend adjusting this value in production.
+sentry.traces-sample-rate=1.0
         `,
       },
       {
@@ -107,11 +107,11 @@ export const steps = ({
           <p>{tct('Or, modify [code:src/main/application.yml]:', {code: <code />})}</p>
         ),
         code: `
-        sentry:
-          dsn:${dsn}
-          # Set traces-sample-rate to 1.0 to capture 100% of transactions for performance monitoring.
-          # We recommend adjusting this value in production.
-          traces-sample-rate: 1.0
+sentry:
+  dsn:${dsn}
+  # Set traces-sample-rate to 1.0 to capture 100% of transactions for performance monitoring.
+  # We recommend adjusting this value in production.
+  traces-sample-rate: 1.0
         `,
         additionalInfo: (
           <p>
@@ -128,11 +128,11 @@ export const steps = ({
           {
             language: 'xml',
             code: `
-            <dependency>
-                <groupId>io.sentry</groupId>
-                <artifactId>sentry-logback</artifactId>
-                <version>{{@inject packages.version('sentry.java.logback', '4.0.0') }}</version>
-            </dependency>
+<dependency>
+    <groupId>io.sentry</groupId>
+    <artifactId>sentry-logback</artifactId>
+    <version>{{@inject packages.version('sentry.java.logback', '4.0.0') }}</version>
+</dependency>
           `,
           },
           {
@@ -141,44 +141,44 @@ export const steps = ({
               'To upload your source code to Sentry so it can be shown in stack traces, use our Maven plugin.'
             ),
             code: `
-            <build>
-              <plugins>
-                  <plugin>
-                      <groupId>io.sentry</groupId>
-                      <artifactId>sentry-maven-plugin</artifactId>
-                      <version>{{@inject packages.version('sentry.java.mavenplugin', '0.0.2') }}</version>
-                      <configuration>
-                          <!-- for showing output of sentry-cli -->
-                          <debugSentryCli>true</debugSentryCli>
+<build>
+  <plugins>
+    <plugin>
+      <groupId>io.sentry</groupId>
+      <artifactId>sentry-maven-plugin</artifactId>
+      <version>{{@inject packages.version('sentry.java.mavenplugin', '0.0.2') }}</version>
+      <configuration>
+        <!-- for showing output of sentry-cli -->
+        <debugSentryCli>true</debugSentryCli>
 
-                          <!-- download the latest sentry-cli and provide path to it here -->
-                          <!-- download it here: https://github.com/getsentry/sentry-cli/releases -->
-                          <!-- minimum required version is 2.17.3 -->
-                          <sentryCliExecutablePath>/path/to/sentry-cli</sentryCliExecutablePath>
+        <!-- download the latest sentry-cli and provide path to it here -->
+        <!-- download it here: https://github.com/getsentry/sentry-cli/releases -->
+        <!-- minimum required version is 2.17.3 -->
+        <sentryCliExecutablePath>/path/to/sentry-cli</sentryCliExecutablePath>
 
-                          <org>___ORG_SLUG___</org>
+        <org>___ORG_SLUG___</org>
 
-                          <project>___PROJECT_SLUG___</project>
+        <project>___PROJECT_SLUG___</project>
 
-                          <!-- in case you're self hosting, provide the URL here -->
-                          <!--<url>http://localhost:8000/</url>-->
+        <!-- in case you're self hosting, provide the URL here -->
+        <!--<url>http://localhost:8000/</url>-->
 
-                          <!-- provide your auth token via SENTRY_AUTH_TOKEN environment variable -->
-                          <!-- you can find it in Sentry UI: Settings > Account > API > Auth Tokens -->
-                          <authToken>env.SENTRY_AUTH_TOKEN}</authToken>
-                      </configuration>
-                      <executions>
-                          <execution>
-                              <phase>generate-resources</phase>
-                              <goals>
-                                  <goal>uploadSourceBundle</goal>
-                              </goals>
-                          </execution>
-                      </executions>
-                  </plugin>
-              </plugins>
-              ...
-          </build>
+        <!-- provide your auth token via SENTRY_AUTH_TOKEN environment variable -->
+        <!-- you can find it in Sentry UI: Settings > Account > API > Auth Tokens -->
+        <authToken>env.SENTRY_AUTH_TOKEN}</authToken>
+      </configuration>
+      <executions>
+        <execution>
+          <phase>generate-resources</phase>
+          <goals>
+            <goal>uploadSourceBundle</goal>
+          </goals>
+        </execution>
+      </executions>
+    </plugin>
+  </plugins>
+...
+</build>
         `,
           },
         ],
@@ -196,26 +196,26 @@ export const steps = ({
               'To upload your source code to Sentry so it can be shown in stack traces, use our Gradle plugin.'
             ),
             code: `
-              buildscript {
-                repositories {
-                  mavenCentral()
-                }
-              }
+buildscript {
+  repositories {
+    mavenCentral()
+  }
+}
 
-              plugins {
-                id "io.sentry.jvm.gradle" version "{{@inject packages.version('sentry.java.android.gradle-plugin', '3.9.0') }}"
-              }
+plugins {
+  id "io.sentry.jvm.gradle" version "{{@inject packages.version('sentry.java.android.gradle-plugin', '3.9.0') }}"
+}
 
-              sentry {
-                // Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
-                // This enables source context, allowing you to see your source
-                // code as part of your stack traces in Sentry.
-                includeSourceContext = true
+sentry {
+  // Generates a JVM (Java, Kotlin, etc.) source bundle and uploads your source code to Sentry.
+  // This enables source context, allowing you to see your source
+  // code as part of your stack traces in Sentry.
+  includeSourceContext = true
 
-                org = "___ORG_SLUG___"
-                projectName = "___PROJECT_SLUG___"
-                authToken = "your-sentry-auth-token"
-              }
+  org = "___ORG_SLUG___"
+  projectName = "___PROJECT_SLUG___"
+  authToken = "your-sentry-auth-token"
+}
         `,
           },
         ],
@@ -290,17 +290,17 @@ export const steps = ({
             language: 'javascript', // TODO: This shouldn't be javascript but because of better formatting we use it for now
             description: <strong>{t('Spring Boot 2')}</strong>,
             code: `
-            import org.springframework.stereotype.Component;
-            import io.sentry.spring.tracing.SentrySpan;
+import org.springframework.stereotype.Component;
+import io.sentry.spring.tracing.SentrySpan;
 
-            @Component
-            class PersonService {
+@Component
+class PersonService {
 
-              @SentrySpan
-              Person findById(Long id) {
-                ...
-              }
-            }
+  @SentrySpan
+  Person findById(Long id) {
+    ...
+  }
+}
             `,
           },
           {
@@ -329,34 +329,34 @@ export const steps = ({
             language: 'javascript', // TODO: This shouldn't be javascript but because of better formatting we use it for now
             description: <strong>{t('Spring Boot 2')}</strong>,
             code: `
-            import org.springframework.stereotype.Component
-            import io.sentry.spring.tracing.SentrySpan
+import org.springframework.stereotype.Component
+import io.sentry.spring.tracing.SentrySpan
 
-            @Component
-            class PersonService {
+@Component
+class PersonService {
 
-              @SentrySpan(operation = "task")
-              fun findById(id: Long): Person {
-                ...
-              }
-            }
+  @SentrySpan(operation = "task")
+  fun findById(id: Long): Person {
+    ...
+  }
+}
             `,
           },
           {
             language: 'javascript', // TODO: This shouldn't be javascript but because of better formatting we use it for now
             description: <strong>{t('Spring Boot 3')}</strong>,
             code: `
-            import org.springframework.stereotype.Component
-            import io.sentry.spring.jakarta.tracing.SentrySpan
+import org.springframework.stereotype.Component
+import io.sentry.spring.jakarta.tracing.SentrySpan
 
-            @Component
-            class PersonService {
+@Component
+class PersonService {
 
-              @SentrySpan(operation = "task")
-              fun findById(id: Long): Person {
-                ...
-              }
-            }
+  @SentrySpan(operation = "task")
+  fun findById(id: Long): Person {
+    ...
+  }
+}
             `,
           },
         ],

+ 8 - 8
static/app/gettingStartedDocs/javascript/angular.tsx

@@ -89,15 +89,15 @@ export const steps = ({
       {
         language: 'bash',
         code: `
-        # Using yarn (Angular 12+)
-        yarn add @sentry/angular-ivy
-        # Using yarn (Angular 10 and 11)
-        yarn add @sentry/angular
+# Using yarn (Angular 12+)
+yarn add @sentry/angular-ivy
+# Using yarn (Angular 10 and 11)
+yarn add @sentry/angular
 
-        # Using npm (Angular 12+)
-        npm install --save @sentry/angular-ivy
-        # Using npm (Angular 10 and 11)
-        npm install --save @sentry/angular
+# Using npm (Angular 12+)
+npm install --save @sentry/angular-ivy
+# Using npm (Angular 10 and 11)
+npm install --save @sentry/angular
         `,
       },
     ],

+ 2 - 2
static/app/gettingStartedDocs/javascript/ember.tsx

@@ -35,8 +35,8 @@ export const steps = ({
       {
         language: 'bash',
         code: `
-        # Using ember-cli
-        ember install @sentry/ember
+# Using ember-cli
+ember install @sentry/ember
         `,
       },
     ],

+ 4 - 4
static/app/gettingStartedDocs/javascript/gatsby.tsx

@@ -42,11 +42,11 @@ export const steps = ({
       {
         language: 'bash',
         code: `
-        # Using yarn
-        yarn add @sentry/gatsby
+# Using yarn
+yarn add @sentry/gatsby
 
-        # Using npm
-        npm install --save @sentry/gatsby
+# Using npm
+npm install --save @sentry/gatsby
         `,
       },
     ],

+ 4 - 4
static/app/gettingStartedDocs/javascript/javascript.tsx

@@ -42,11 +42,11 @@ export const steps = ({
       {
         language: 'bash',
         code: `
-        # Using yarn
-        yarn add @sentry/browser
+# Using yarn
+yarn add @sentry/browser
 
-        # Using npm
-        npm install --save @sentry/browser
+# Using npm
+npm install --save @sentry/browser
         `,
       },
     ],

+ 3 - 3
static/app/gettingStartedDocs/javascript/nextjs.tsx

@@ -109,9 +109,9 @@ export const steps = ({
         ),
         language: 'bash',
         code: `
-        yarn add @sentry/nextjs
-        # or
-        npm install --save @sentry/nextjs
+yarn add @sentry/nextjs
+# or
+npm install --save @sentry/nextjs
         `,
       },
       {

+ 4 - 4
static/app/gettingStartedDocs/javascript/react.tsx

@@ -42,11 +42,11 @@ export const steps = ({
       {
         language: 'bash',
         code: `
-        # Using yarn
-        yarn add @sentry/react
+# Using yarn
+yarn add @sentry/react
 
-        # Using npm
-        npm install --save @sentry/react
+# Using npm
+npm install --save @sentry/react
         `,
       },
     ],

+ 4 - 4
static/app/gettingStartedDocs/javascript/remix.tsx

@@ -53,11 +53,11 @@ export const steps = ({
       {
         language: 'bash',
         code: `
-        # Using yarn
-        yarn add @sentry/remix
+# Using yarn
+yarn add @sentry/remix
 
-        # Using npm
-        npm install --save @sentry/remix
+# Using npm
+npm install --save @sentry/remix
         `,
       },
     ],

+ 4 - 4
static/app/gettingStartedDocs/javascript/svelte.tsx

@@ -42,11 +42,11 @@ export const steps = ({
       {
         language: 'bash',
         code: `
-        # Using yarn
-        yarn add @sentry/svelte
+# Using yarn
+yarn add @sentry/svelte
 
-        # Using npm
-        npm install --save @sentry/svelte
+# Using npm
+npm install --save @sentry/svelte
         `,
       },
     ],

+ 4 - 4
static/app/gettingStartedDocs/javascript/vue.tsx

@@ -43,11 +43,11 @@ export const steps = ({
       {
         language: 'bash',
         code: `
-        # Using yarn
-        yarn add @sentry/vue
+# Using yarn
+yarn add @sentry/vue
 
-        # Using npm
-        npm install --save @sentry/vue
+# Using npm
+npm install --save @sentry/vue
         `,
       },
     ],

Some files were not shown because too many files changed in this diff