diff --git a/doc/administration/cicd/job_artifacts_troubleshooting.md b/doc/administration/cicd/job_artifacts_troubleshooting.md index b47da5357b95d27c763202f571f8b5c07762ce52..db2c60d3922d4112bbe1b242639f7969d93b9242 100644 --- a/doc/administration/cicd/job_artifacts_troubleshooting.md +++ b/doc/administration/cicd/job_artifacts_troubleshooting.md @@ -475,7 +475,7 @@ gitlab-rake gitlab:refresh_project_statistics_build_artifacts_size[https://examp The `https://example.com/path/file.csv` file must list the project IDs for all projects for which you want to recalculate artifact storage usage. Use this format for the file: -```csv +```plaintext PROJECT_ID 1 2 diff --git a/doc/administration/gitaly/configure_gitaly.md b/doc/administration/gitaly/configure_gitaly.md index fca9b5ad6a89e4e8f0c48b1fb1100b0eb1c0f1cd..3d27ef3d7e530b05e425aa2e03852a04d37cd98a 100644 --- a/doc/administration/gitaly/configure_gitaly.md +++ b/doc/administration/gitaly/configure_gitaly.md @@ -755,7 +755,7 @@ gitaly['configuration'] = { After you have made this change, your [Prometheus query](#verify-authentication-monitoring) should return something like: -```prometheus +```promql {enforced="false",status="would be ok"} 4424.985419441742 ``` @@ -825,7 +825,7 @@ Without completing this step, you have **no Gitaly authentication**. Refresh your [Prometheus query](#verify-authentication-monitoring). You should now see a similar result as you did at the start. For example: -```prometheus +```promql {enforced="true",status="ok"} 4424.985419441742 ``` diff --git a/doc/administration/operations/rails_console.md b/doc/administration/operations/rails_console.md index f80fa9f436c43ba3cded82dcbfc768f3f7d3758c..5b8614b74aa0c02d914912f2e485f3b8dc28dc16 100644 --- a/doc/administration/operations/rails_console.md +++ b/doc/administration/operations/rails_console.md @@ -822,14 +822,14 @@ sudo gitlab-rails runner /scripts/helloworld.rb Some output in the console might be filtered by default to prevent leaks of certain values like variables, logs, or secrets. This output displays as `[FILTERED]`. For example: -```plain_text +```plaintext > Plan.default.actual_limits => ci_instance_level_variables: "[FILTERED]", ``` To work around the filtering, read the values directly from the object. For example: -```plain_text +```plaintext > Plan.default.limits.ci_instance_level_variables => 25 ``` diff --git a/doc/administration/raketasks/user_management.md b/doc/administration/raketasks/user_management.md index 5d994ace4e5733a52bfe832fa69ca751581378f6..e6ab731613ffe545614ef3d0ccdb0a3d96a7e726 100644 --- a/doc/administration/raketasks/user_management.md +++ b/doc/administration/raketasks/user_management.md @@ -217,7 +217,7 @@ bundle exec rake "duo_pro:bulk_user_assignment['path/to/your/file.csv']" The CSV file should have the following format: -```csv +```plaintext username user1 user2 diff --git a/doc/api/license.md b/doc/api/license.md index 0c7242bda7810cf6baf3877da5d7f36f191bb8a9..31470bde7510f53ac086e8ede42f5863b4e80264 100644 --- a/doc/api/license.md +++ b/doc/api/license.md @@ -272,7 +272,7 @@ curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab Example response: -```csv +```plaintext License Key,"eyJkYXRhIjoib1EwRWZXU3RobDY2Yl= " Email,user@example.com diff --git a/doc/api/vulnerability_exports.md b/doc/api/vulnerability_exports.md index 9f35245500cd587c8400f4fccb01a5c948bcff28..998200637ab01d907600fa9234cc60a4900e5b69 100644 --- a/doc/api/vulnerability_exports.md +++ b/doc/api/vulnerability_exports.md @@ -190,7 +190,7 @@ The response is `404 Not Found` if the vulnerability export is not finished yet Example response: -```csv +```plaintext Group Name,Project Name,Tool,Scanner Name,Status,Vulnerability,Details,Additional Info,Severity,CVE,CWE,Other Identifiers,Detected At,Location,Activity,Comments,Full Path,CVSS Vectors,Dismissal Reason Gitlab.org,Defend,container_scanning,Trivy,resolved,CVE-2019-14697 in musl-utils-1.1.20-r4,"musl libc through 1.1.23 has an x87 floating-point stack adjustment imbalance, related to the math/i386/ directory. In some cases, use of this library could introduce out-of-bounds writes that are not present in an application's source code.",CVE-2019-14697 in musl-utils-1.1.20-r4,critical,CVE-2019-14697,,"",2022-10-07 13:34:41 UTC,"{""image""=>""python:3.4-alpine"", ""dependency""=>{""package""=>{""name""=>""musl-utils""}, ""version""=>""1.1.20-r4""}, ""operating_system""=>""alpine 3.9.2""}",true,"2022-10-07 13:41:08 UTC|root|resolved|changed vulnerability status to resolved",group/project/1,,, Gitlab.org,Defend,container_scanning,Trivy,detected,CVE-2019-19242 in sqlite-libs-3.26.0-r3,"SQLite 3.30.1 mishandles pExpr->y.pTab, as demonstrated by the TK_COLUMN case in sqlite3ExprCodeTarget in expr.c.",CVE-2019-19242 in sqlite-libs-3.26.0-r3,medium,CVE-2019-19242,,"",2022-10-07 13:34:41 UTC,"{""image""=>""python:3.4-alpine"", ""dependency""=>{""package""=>{""name""=>""sqlite-libs""}, ""version""=>""3.26.0-r3""}, ""operating_system""=>""alpine 3.9.2""}",true,"",group/project/2,,, diff --git a/doc/development/api_styleguide.md b/doc/development/api_styleguide.md index a860075a19ac457879bf75019545462bb694b637..a356991bd17b8105bbd283e30fbb1626f029d821 100644 --- a/doc/development/api_styleguide.md +++ b/doc/development/api_styleguide.md @@ -308,7 +308,7 @@ helper usage must be in wrapped into the `expose_path` helper call. For instance: -```haml +```ruby - endpoint = expose_path(api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: @issue.iid)) ``` diff --git a/doc/development/application_slis/_index.md b/doc/development/application_slis/_index.md index 1b3fbac7fc19531e9ae64d9716068929cb9e1f96..67f0b38b1e122bf3de6f88c5c00c9d6978e91441 100644 --- a/doc/development/application_slis/_index.md +++ b/doc/development/application_slis/_index.md @@ -90,14 +90,14 @@ Gitlab::Metrics::Sli::Apdex[:received_email].increment( Calling `#increment` on this SLI will increment the total Prometheus counter -```prometheus +```promql gitlab_sli:received_email_apdex:total{ feature_category='service_desk', email_type='service_desk' } ``` If the `success:` argument passed is truthy, then the success counter will also be incremented: -```prometheus +```promql gitlab_sli:received_email_apdex:success_total{ feature_category='service_desk', email_type='service_desk' } ``` @@ -148,7 +148,7 @@ When these changes are merged, and the aggregations in [Mimir](https://dashboards.gitlab.net/explore?schemaVersion=1&panes=%7B%22m95%22%3A%7B%22datasource%22%3A%22e58c2f51-20f8-4f4b-ad48-2968782ca7d6%22%2C%22queries%22%3A%5B%7B%22refId%22%3A%22A%22%2C%22expr%22%3A%22%22%2C%22range%22%3Atrue%2C%22instant%22%3Atrue%2C%22datasource%22%3A%7B%22type%22%3A%22prometheus%22%2C%22uid%22%3A%22e58c2f51-20f8-4f4b-ad48-2968782ca7d6%22%7D%7D%5D%2C%22range%22%3A%7B%22from%22%3A%22now-6h%22%2C%22to%22%3A%22now%22%7D%7D%7D&orgId=1) recorded, query Mimir to see the success ratio of the new aggregated metrics. For example: -```prometheus +```promql sum by (environment, stage, type)(application_sli_aggregation:rails_request:apdex:success:rate_1h) / sum by (environment, stage, type)(application_sli_aggregation:rails_request:apdex:weight:score_1h) diff --git a/doc/development/cascading_settings.md b/doc/development/cascading_settings.md index ea487a979dddec05f912fbee6370916549c4575e..19c0b8bb902cdb40ad360a53a2b96a2c63f56184 100644 --- a/doc/development/cascading_settings.md +++ b/doc/development/cascading_settings.md @@ -230,7 +230,7 @@ This function should be imported and called in the [page-specific JavaScript](fe ### Put it all together -```haml +```ruby -# app/views/groups/edit.html.haml = render 'shared/namespaces/cascading_settings/lock_tooltips' diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md index d0c86989426b7d3aeacb0ae13b714cd4bebd7a08..0adb9a5205d9599ab3baeebc1817261500618ca8 100644 --- a/doc/development/ee_features.md +++ b/doc/development/ee_features.md @@ -717,7 +717,7 @@ The disadvantage of this: The `render_if_exists` view path argument must be relative to `app/views/` and `ee/app/views`. Resolving an EE template path that is relative to the CE view path doesn't work. -```haml +```ruby - # app/views/projects/index.html.haml = render_if_exists 'button' # Will not render `ee/app/views/projects/_button` and will quietly fail @@ -745,7 +745,7 @@ In this case, we could as well just use `render_ce` which would ignore any EE partials. One example would be `ee/app/views/projects/settings/_archive.html.haml`: -```haml +```ruby - return if @project.marked_for_deletion? = render_ce 'projects/settings/archive' ``` diff --git a/doc/development/experiment_guide/implementing_experiments.md b/doc/development/experiment_guide/implementing_experiments.md index 2e6a0004b6c27da43a5b423251bcbd95b4cebf52..f986d517a710c7f3becab6df8c04c94e8e62b237 100644 --- a/doc/development/experiment_guide/implementing_experiments.md +++ b/doc/development/experiment_guide/implementing_experiments.md @@ -61,7 +61,7 @@ This command creates a scenario where half of everyone who encounters the experiment would be assigned the _control_, 25% would be assigned the _red_ variant, and 25% would be assigned the _blue_ variant: -```slack +```plaintext /chatops run feature set pill_color 50 --actors ``` @@ -85,7 +85,7 @@ handled. We can also implement this experiment in a HAML file with HTML wrappings: -```haml +```ruby #cta-interface - experiment(:pill_color, actor: current_user) do |e| - e.control do diff --git a/doc/development/fe_guide/frontend_faq.md b/doc/development/fe_guide/frontend_faq.md index d2c896945422b385dde87a28ac977de1b18b4fce..6aa1a17f1391dc86a147263a5bb87153f8c2dd56 100644 --- a/doc/development/fe_guide/frontend_faq.md +++ b/doc/development/fe_guide/frontend_faq.md @@ -105,7 +105,7 @@ When referencing Backend rails paths, avoid using `*_url`, and use `*_path` inst Example: -```haml +```ruby -# Bad :( #js-foo{ data: { foo_url: some_rails_foo_url } } diff --git a/doc/development/fe_guide/icons.md b/doc/development/fe_guide/icons.md index de6a7cabf8251739724e94903bbd120e7732a920..7a20e1bb0838821f849b3f660c83420e05eed502 100644 --- a/doc/development/fe_guide/icons.md +++ b/doc/development/fe_guide/icons.md @@ -33,7 +33,7 @@ sprite_icon(icon_name, size: nil, css_class: '') **Example** -```haml +```ruby = sprite_icon('issues', size: 72, css_class: 'icon-danger') ``` @@ -89,7 +89,7 @@ Use the following function inside JS to render an icon: To insert a loading spinner in HAML or Rails use the `gl_loading_icon` helper: -```haml +```ruby = gl_loading_icon ``` @@ -106,7 +106,7 @@ by the examples that follow: The following HAML expression generates a loading icon's markup and centers the icon. -```haml +```ruby = gl_loading_icon ``` @@ -115,7 +115,7 @@ centers the icon. The following HAML expression generates an inline loading icon's markup with a custom size. It also appends a margin utility class. -```haml +```ruby = gl_loading_icon(inline: true, size: 'lg', css_class: 'gl-mr-2') ``` @@ -156,7 +156,7 @@ Using the class `svg-content` around it ensures nice rendering. **Example** -```haml +```ruby .svg-content = image_tag 'illustrations/merge_requests.svg' ``` diff --git a/doc/development/fe_guide/troubleshooting.md b/doc/development/fe_guide/troubleshooting.md index 49f21765420398cddfb732ffcda2fc7d81449157..1cdfd1ed87d6759d4b9d9c72db7e610c9f9dbe18 100644 --- a/doc/development/fe_guide/troubleshooting.md +++ b/doc/development/fe_guide/troubleshooting.md @@ -25,14 +25,14 @@ See [this video](https://youtu.be/-BkEhghP-kM) for an in-depth overview and inve **Remedy - Try cloning the object that has Vue watchers** -```patch +```diff - expect(wrapper.findComponent(ChildComponent).props()).toEqual(...); + expect(cloneDeep(wrapper.findComponent(ChildComponent).props())).toEqual(...) ``` **Remedy - Try using `toMatchObject` instead of `toEqual`** -```patch +```diff - expect(wrapper.findComponent(ChildComponent).props()).toEqual(...); + expect(wrapper.findComponent(ChildComponent).props()).toMatchObject(...); ``` @@ -82,7 +82,7 @@ See this [closed MR](https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/20 VueApollo will skip manually running `provide()` if it sees that an `apolloProvider` is provided in the `$options`. -```patch +```diff new Vue( el, + apolloProvider: {}, @@ -155,7 +155,7 @@ query workItemTreeQuery($id: WorkItemID!, $pageSize: Int = 100, $endCursor: Stri } ``` -```patch +```diff query workItemTreeQuery($id: WorkItemID!, $pageSize: Int = 100, $endCursor: String) { workItem(id: $id) { namespace { diff --git a/doc/development/fe_guide/view_component.md b/doc/development/fe_guide/view_component.md index 9c10be7aa8c734b83d33be3e40282fa63f565902..9c8f2810b007ccb851506a6663bdbd07b9359596 100644 --- a/doc/development/fe_guide/view_component.md +++ b/doc/development/fe_guide/view_component.md @@ -41,13 +41,13 @@ The `Pajamas::AlertComponent` follows the [Pajamas Alert](https://design.gitlab. By default this creates a dismissible info alert with icon: -```haml +```ruby = render Pajamas::AlertComponent.new(title: "Almost done!") ``` You can set variant, hide the icons and more: -```haml +```ruby = render Pajamas::AlertComponent.new(title: "All done!", variant: :success, dismissible: :false, @@ -65,7 +65,7 @@ The `Pajamas::BannerComponent` follows the [Pajamas Banner](https://design.gitla In its simplest form the banner component looks like this: -```haml +```ruby = render Pajamas::BannerComponent.new(button_text: 'Learn more', button_link: example_path, svg_path: 'illustrations/example.svg') do |c| - c.with_title { 'Hello world!' } @@ -75,7 +75,7 @@ In its simplest form the banner component looks like this: If you have a need for more control, you can also use the `illustration` slot instead of `svg_path` and the `primary_action` slot instead of `button_text` and `button_link`: -```haml +```ruby = render Pajamas::BannerComponent.new do |c| - c.with_illustration do = custom_icon('my_inline_svg') @@ -97,14 +97,14 @@ The `Pajamas::ButtonComponent` follows the [Pajamas Button](https://design.gitla The button component has a lot of options but all of them have good defaults, so the simplest button looks like this: -```haml +```ruby = render Pajamas::ButtonComponent.new do |c| = _('Button text goes here') ``` The following example shows most of the available options: -```haml +```ruby = render Pajamas::ButtonComponent.new(category: :secondary, variant: :danger, size: :small, @@ -117,7 +117,7 @@ The following example shows most of the available options: You can also create button-like looking `<a>` tags, like this: -```haml +```ruby = render Pajamas::ButtonComponent.new(href: root_path) do |c| Go home ``` @@ -133,7 +133,7 @@ The `Pajamas::CardComponent` follows the [Pajamas Card](https://design.gitlab.co The card has one mandatory `body` slot and optional `header` and `footer` slots: -```haml +```ruby = render Pajamas::CardComponent.new do |c| - c.with_header do I'm the header. @@ -146,7 +146,7 @@ The card has one mandatory `body` slot and optional `header` and `footer` slots: If you want to add custom attributes to any of these or the card itself, use the following options: -```haml +```ruby = render Pajamas::CardComponent.new(card_options: {id: "my-id"}, body_options: {data: { count: 1 }}) ``` @@ -163,7 +163,7 @@ The `name` argument and `label` slot are required. For example: -```haml +```ruby = render Pajamas::CheckboxTagComponent.new(name: 'project[initialize_with_sast]', checkbox_options: { data: { testid: 'initialize-with-sast-checkbox', track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_sast' } }) do |c| - c.with_label do @@ -195,7 +195,7 @@ For the full list of options, see its The `Pajamas::ToggleComponent` follows the [Pajamas Toggle](https://design.gitlab.com/components/toggle/) specification. -```haml +```ruby = render Pajamas::ToggleComponent.new(classes: 'js-force-push-toggle', label: s_("ProtectedBranch|Toggle allowed to force push"), is_checked: protected_branch.allow_force_push, @@ -225,7 +225,7 @@ A standard page header with a page title and optional actions. **Example:** -```haml +```ruby = render ::Layouts::PageHeadingComponent.new(_('Page title')) do |c| - c.with_actions do = buttons @@ -240,7 +240,7 @@ A list container being used to host a table or list with user actions such as cr **Example:** -```haml +```ruby = render ::Layouts::CrudComponent.new(_('CRUD title'), icon: 'ICONNAME', count: COUNT) do |c| - c.with_description do = description @@ -265,7 +265,7 @@ Many of the settings pages use a layout where the title and description are on t **Example:** -```haml +```ruby = render ::Layouts::HorizontalSectionComponent.new(options: { class: 'gl-mb-6' }) do |c| - c.with_title { _('Naming, visibility') } - c.with_description do @@ -286,7 +286,7 @@ A settings block (accordion) to group related settings. **Example:** -```haml +```ruby = render ::Layouts::SettingsBlock.new(_('Settings block heading')) do |c| - c.with_description do = description @@ -303,7 +303,7 @@ Similar to SettingsBlock (see above) this component is used to group related set **Example:** -```haml +```ruby = render ::Layouts::SettingsSection.new(_('Settings section heading')) do |c| - c.with_description do = description diff --git a/doc/development/fe_guide/vue.md b/doc/development/fe_guide/vue.md index b043be31ac6fc480cfa3e98758bec1bad9423018..7c4dfd3e20e4204ad30f92674b69497e16634a82 100644 --- a/doc/development/fe_guide/vue.md +++ b/doc/development/fe_guide/vue.md @@ -266,7 +266,7 @@ a Rails form to Vue, or when [integrating components](https://gitlab.com/gitlab- The [`parseRailsFormFields`](https://gitlab.com/gitlab-org/gitlab/-/blob/fe88797f682c7ff0b13f2c2223a3ff45ada751c1/app/assets/javascripts/lib/utils/forms.js#L107) utility function can be used to parse the generated form input attributes so they can be passed to the Vue application. This enables us to integrate Vue components without changing how the form submits. -```haml +```ruby -# form.html.haml = form_for user do |form| .js-user-form diff --git a/doc/development/i18n/externalization.md b/doc/development/i18n/externalization.md index a67339d4c846037997e7263ab5fd4ea5408b0a37..e9a06c5f3c97579ba309faa99256fa66ad011485 100644 --- a/doc/development/i18n/externalization.md +++ b/doc/development/i18n/externalization.md @@ -113,13 +113,13 @@ Messages in the API (`lib/api/` or `app/graphql`) do not need to be externalized Given the following content in HAML: -```haml +```ruby %h1 Hello world! ``` You can mark that content for translation with: -```haml +```ruby %h1= _("Hello world!") ``` diff --git a/doc/development/internal_analytics/internal_event_instrumentation/quick_start.md b/doc/development/internal_analytics/internal_event_instrumentation/quick_start.md index 3448bd4e4f56c8d0c35c591a1b3a816c02a0e01f..8cd9bda020acd6239289d3f7386cd3d239b35f7b 100644 --- a/doc/development/internal_analytics/internal_event_instrumentation/quick_start.md +++ b/doc/development/internal_analytics/internal_event_instrumentation/quick_start.md @@ -376,7 +376,7 @@ This attribute ensures that if we want to track GitLab internal events for a but #### Haml -```haml +```ruby = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle', data: { event_tracking: 'click_previous_blame_on_blob_page' }}) do ``` @@ -384,7 +384,7 @@ This attribute ensures that if we want to track GitLab internal events for a but Sometimes we want to send internal events when the component is rendered or loaded. In these cases, we can add the `data-event-tracking-load="true"` attribute: -```haml +```ruby = render Pajamas::ButtonComponent.new(button_options: { data: { event_tracking_load: 'true', event_tracking: 'click_previous_blame_on_blob_page' } }) do = _("New project") ``` @@ -435,7 +435,7 @@ For data-event attributes: For Haml: -```haml +```ruby = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle', data: { event_tracking: 'action', event_label: 'group_runner_form', event_property: dynamic_property_var, event_value: 2, event_additional: '{"key1": "value1", "key2": "value2"}' }}) do ``` @@ -593,7 +593,7 @@ you can use the [`trigger_internal_events` matcher](#composable-matchers) to ass For example, if you need to test the below Haml, -```haml +```ruby %div{ data: { testid: '_testid_', event_tracking: 'some_event', event_label: 'some_label' } } ``` diff --git a/doc/development/module_with_instance_variables.md b/doc/development/module_with_instance_variables.md index ec860ff4c0a9322fb8bd6162e786790a732de576..cd2d1cc67b499de11ca742608621c984775ba505 100644 --- a/doc/development/module_with_instance_variables.md +++ b/doc/development/module_with_instance_variables.md @@ -164,13 +164,13 @@ point of view), making it extremely hard to track data dependency. We're trying to use something like this instead: -```haml +```ruby = render 'projects/commits/commit', commit: commit, ref: ref, project: project ``` And in the partial: -```haml +```ruby - ref = local_assigns.fetch(:ref) - commit = local_assigns.fetch(:commit) - project = local_assigns.fetch(:project) diff --git a/doc/development/product_qualified_lead_guide/_index.md b/doc/development/product_qualified_lead_guide/_index.md index 04e1e826bad5e1b71238c55b6055ecdc8959fd43..053948d2f8d4a963c6b980a10397867738d734ed 100644 --- a/doc/development/product_qualified_lead_guide/_index.md +++ b/doc/development/product_qualified_lead_guide/_index.md @@ -50,7 +50,7 @@ You can import a hand-raise lead button in the following ways: For Haml: -```haml +```ruby .js-hand-raise-lead-trigger{ data: discover_page_hand_raise_lead_data(group) } ``` diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index 7e994e877cc4697fa7aaf84e0c26970ab3050f46..ae6e17a4cc8efeb6c6c23537b9b4ce8d95e4f304 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -1462,7 +1462,7 @@ you can use the `have_tracking` matcher method to assert if expected data attrib For example, if we need to test the below Haml, -```haml +```ruby %div{ data: { testid: '_testid_', track_action: 'render', track_label: '_tracking_label_' } } ``` diff --git a/doc/development/testing_guide/end_to_end/beginners_guide/_index.md b/doc/development/testing_guide/end_to_end/beginners_guide/_index.md index c178f322f22c02ec946ee2293547384331ce3736..558adc8adbb9416014327ef343dac2e062e1dd28 100644 --- a/doc/development/testing_guide/end_to_end/beginners_guide/_index.md +++ b/doc/development/testing_guide/end_to_end/beginners_guide/_index.md @@ -301,7 +301,7 @@ end Next, define the element `closed-status-box` within your view, so your Page Object can see it. -```haml +```ruby -#=> app/views/projects/issues/show.html.haml .issuable-status-box.status-box.status-box-issue-closed{ ..., data: { testid: 'closed-status-box' } } ``` diff --git a/doc/development/testing_guide/end_to_end/beginners_guide/page_objects.md b/doc/development/testing_guide/end_to_end/beginners_guide/page_objects.md index 42b48ae6634b78249ca13f78c13a04984d3dce27..12b7ceb290201e61e4e4c6c7bb3192d4ac99ad61 100644 --- a/doc/development/testing_guide/end_to_end/beginners_guide/page_objects.md +++ b/doc/development/testing_guide/end_to_end/beginners_guide/page_objects.md @@ -146,7 +146,7 @@ In our case, `data-testid="login-field"`, `data-testid="password-field"` and `da `app/views/my/view.html.haml` -```haml +```ruby = f.text_field :login, class: "form-control top", autofocus: "autofocus", autocapitalize: "off", autocorrect: "off", required: true, title: "This field is required.", data: { testid: 'login_field' } = f.password_field :password, class: "form-control bottom", required: true, title: "This field is required.", data: { testid: 'password_field' } = f.submit "Sign in", class: "btn btn-confirm", data: { testid: 'sign_in_button' } @@ -187,7 +187,7 @@ We got around this by adding the `data-qa-*` extensible selection mechanism. Given the following Rails view (using GitLab Issues as an example): -```haml +```ruby %ul.issues-list - @issues.each do |issue| %li.issue{data: { testid: 'issue', qa_issue_title: issue.title } }= link_to issue @@ -219,7 +219,7 @@ end *By an index...* -```haml +```ruby %ol - @some_model.each_with_index do |model, idx| %li.model{ data: { testid: 'model', qa_index: idx } } diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md index 17b6bb9790ef765b70e91d3bbc28c402c6345385..f46606e5d6f0ec19b3e8a9522773e42bd2c0577d 100644 --- a/doc/development/testing_guide/frontend_testing.md +++ b/doc/development/testing_guide/frontend_testing.md @@ -1558,7 +1558,7 @@ it('makes the name look pretty', () => { When this test runs the first time a fresh `.snap` file will be created. It will look something like this: -```txt +```plaintext // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`makes the name look pretty`] = ` diff --git a/doc/user/application_security/api_fuzzing/troubleshooting.md b/doc/user/application_security/api_fuzzing/troubleshooting.md index fadc0c89c869333bf6c33e8ac5030236abbc1e50..cea2d65423a23b0f1bc355caf0390b07d214e89c 100644 --- a/doc/user/application_security/api_fuzzing/troubleshooting.md +++ b/doc/user/application_security/api_fuzzing/troubleshooting.md @@ -286,7 +286,7 @@ This error message occurs when pulling an image from a container registry that r In the job console output the error looks like: -```log +```plaintext Running with gitlab-runner 15.6.0~beta.186.ga889181a (a889181a) on blue-2.shared.runners-manager.gitlab.com/default XxUrkriX Resolving secrets @@ -442,13 +442,13 @@ This issue can be identified by two error messages. The first error message is s _Error message from job console:_ -```log +```plaintext 05:48:38 [ERR] API Security: Testing failed: An unexpected exception occurred: Index was outside the bounds of the array. ``` _Error message from `gl_api_security-scanner.log`:_ -```log +```plaintext 08:45:43.616 [ERR] <Peach.Web.Core.Services.WebRunnerMachine> Unexpected exception in WebRunnerMachine::Run() System.IndexOutOfRangeException: Index was outside the bounds of the array. at Peach.Web.Runner.Services.RunnerOptions.GetHeaders() in /builds/gitlab-org/security-products/analyzers/api-fuzzing-src/web/PeachWeb/Runner/Services/[RunnerOptions.cs:line 362 diff --git a/doc/user/application_security/api_security_testing/troubleshooting.md b/doc/user/application_security/api_security_testing/troubleshooting.md index 5f2359acb6c654424421c06a93623f191a1b75ec..1ddc7ea06f0477d21024b73515f749bab70cf81d 100644 --- a/doc/user/application_security/api_security_testing/troubleshooting.md +++ b/doc/user/application_security/api_security_testing/troubleshooting.md @@ -256,7 +256,7 @@ This error message occurs when pulling an image from a container registry that r In the job console output the error looks like: -```log +```plaintext Running with gitlab-runner 15.6.0~beta.186.ga889181a (a889181a) on blue-2.shared.runners-manager.gitlab.com/default XxUrkriX Resolving secrets @@ -418,13 +418,13 @@ This issue can be identified by two error messages. The first error message is s _Error message from job console:_ -```log +```plaintext 05:48:38 [ERR] API Security: Testing failed: An unexpected exception occurred: Index was outside the bounds of the array. ``` _Error message from `gl_api_security-scanner.log`:_ -```log +```plaintext 08:45:43.616 [ERR] <Peach.Web.Core.Services.WebRunnerMachine> Unexpected exception in WebRunnerMachine::Run() System.IndexOutOfRangeException: Index was outside the bounds of the array. at Peach.Web.Runner.Services.RunnerOptions.GetHeaders() in /builds/gitlab-org/security-products/analyzers/api-fuzzing-src/web/PeachWeb/Runner/Services/[RunnerOptions.cs:line 362 diff --git a/doc/user/application_security/coverage_fuzzing/_index.md b/doc/user/application_security/coverage_fuzzing/_index.md index c070d891826d9df2acdbe209a3da7955b6e57534..1ff1c1e926ca5d7d168397b89b3e0bdcc43c0d7a 100644 --- a/doc/user/application_security/coverage_fuzzing/_index.md +++ b/doc/user/application_security/coverage_fuzzing/_index.md @@ -238,7 +238,7 @@ For detailed information about the `gl-coverage-fuzzing-report.json` file's form Example coverage-guided fuzzing report: -```json-doc +```json { "version": "v1.0.8", "regression": false, diff --git a/doc/user/application_security/dast/browser/checks/16.6.md b/doc/user/application_security/dast/browser/checks/16.6.md index d29457367e4f4a118cf6c03a5d64ff9b6eb9eb61..01c9f4e57ea6217a76bc0a3f29c688de39ec948a 100644 --- a/doc/user/application_security/dast/browser/checks/16.6.md +++ b/doc/user/application_security/dast/browser/checks/16.6.md @@ -17,7 +17,7 @@ vulnerability is identified in the particular version. To remove the `X-AspNetMvc-Version` information set `MvcHandler.DisableMvcResponseHeader = true;` in the `Global.asax.cs` file in the `Application_Start()` method. -```cs +```csharp protected void Application_Start() { MvcHandler.DisableMvcResponseHeader = true; diff --git a/doc/user/application_security/dast/browser/configuration/authentication.md b/doc/user/application_security/dast/browser/configuration/authentication.md index a441fc983df62bcc45ccc41b2ecba7ead94a365e..21c2ede004c74a5cc4f15ca5d991b6b9e77a4d12 100644 --- a/doc/user/application_security/dast/browser/configuration/authentication.md +++ b/doc/user/application_security/dast/browser/configuration/authentication.md @@ -314,7 +314,7 @@ Valid starting Expires Service principal The DAST scanner will also output the following, indicating success: -```log +```plaintext 2024-11-08T17:03:09.226 INF AUTH attempting to authenticate find_auth_fields="basic-digest" 2024-11-08T17:03:09.226 INF AUTH loading login page LoginURL="https://target.example.com" 2024-11-08T17:03:10.619 INF AUTH verifying if login attempt was successful true_when="HTTP status code < 400 and has authentication token and no login form found (auto-detected)" diff --git a/doc/user/application_security/dast/browser/troubleshooting.md b/doc/user/application_security/dast/browser/troubleshooting.md index aed739b23e6bc1ef2e26136220122df72891b3c3..a4c18df758583e52c5ecfeefe98d6b0e77cda24e 100644 --- a/doc/user/application_security/dast/browser/troubleshooting.md +++ b/doc/user/application_security/dast/browser/troubleshooting.md @@ -90,7 +90,7 @@ Log messages have the format `[time] [log level] [log module] [message] [additio For example, the following log entry has level `INFO`, is part of the `CRAWL` log module, has the message `Crawled path` and the additional properties `nav_id` and `path`. -```txt +```plaintext 2021-04-21T00:34:04.000 INF CRAWL Crawled path nav_id=0cc7fd path="LoadURL [https://my.site.com:8090]" ``` diff --git a/doc/user/application_security/sast/troubleshooting.md b/doc/user/application_security/sast/troubleshooting.md index c3f8453fa632446d59d208b74355d25e255ed4cc..296282c14a7ec585cd0cd8a65a83c4edd3f5269a 100644 --- a/doc/user/application_security/sast/troubleshooting.md +++ b/doc/user/application_security/sast/troubleshooting.md @@ -107,7 +107,7 @@ characters in the source code. To fix this error, enable UTF-8 for your project' For Gradle builds, add the following to your `build.gradle` file: -```gradle +```groovy compileJava.options.encoding = 'UTF-8' tasks.withType(JavaCompile) { options.encoding = 'UTF-8' diff --git a/doc/user/packages/maven_repository/_index.md b/doc/user/packages/maven_repository/_index.md index 2426e209712efb5be1a43e2e92fc54d93d635541..9579a4a2b03125ecae981d5d17cb12d7ffdc7f07 100644 --- a/doc/user/packages/maven_repository/_index.md +++ b/doc/user/packages/maven_repository/_index.md @@ -1270,7 +1270,7 @@ This usually indicates an authentication issue. Check that: GitLab has specific requirements for version strings. Ensure your version follows the format: -```regex +```plaintext ^(?!.*\.\.)(?!.*\.$)[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*(\+[0-9A-Za-z-]+)?$ ``` diff --git a/doc/user/packages/terraform_module_registry/_index.md b/doc/user/packages/terraform_module_registry/_index.md index d5a40cd625dab8126660a874200abc93e2efd886..f1144f9cf89a7b4a76589afd93e78ce0a6e6f6b6 100644 --- a/doc/user/packages/terraform_module_registry/_index.md +++ b/doc/user/packages/terraform_module_registry/_index.md @@ -254,7 +254,7 @@ To reference a Terraform module using a project-level source, use the [fetching You can provide authentication tokens (job tokens, personal access tokens, or deploy tokens) for `terraform` in your `~/.netrc` file: -```netrc +```plaintext machine gitlab.com login <USERNAME> password <TOKEN> diff --git a/doc/user/packages/yarn_repository/_index.md b/doc/user/packages/yarn_repository/_index.md index aada5a45c88c7f9482cb30e1f1abec17a3ec6679..aae5862809752b36ce46c333d4a27cbe0736cf2b 100644 --- a/doc/user/packages/yarn_repository/_index.md +++ b/doc/user/packages/yarn_repository/_index.md @@ -377,7 +377,7 @@ yarn config set '//gitlab.example.com/api/v4/packages/npm/:_authToken' '<token>' If you use `yarn install` from a Dockerfile, when you build the Dockerfile you might get an error like this: -```log +```plaintext ... #6 8.621 fatal: unable to access 'https://gitlab.com/path/to/project/': Problem with the SSL CA cert (path? access rights?) #6 8.621 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.