Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9af54596
Commit
9af54596
authored
Jun 02, 2021
by
Takuya Noguchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format code blocks in docs
Signed-off-by:
Takuya Noguchi
<
takninnovationresearch@gmail.com
>
parent
22c2ff1a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
26 deletions
+26
-26
doc/administration/logs.md
doc/administration/logs.md
+1
-1
doc/ci/merge_request_pipelines/index.md
doc/ci/merge_request_pipelines/index.md
+1
-1
doc/ci/migration/circleci.md
doc/ci/migration/circleci.md
+1
-1
doc/development/ee_features.md
doc/development/ee_features.md
+1
-1
doc/development/module_with_instance_variables.md
doc/development/module_with_instance_variables.md
+7
-7
doc/development/reusing_abstractions.md
doc/development/reusing_abstractions.md
+3
-3
doc/development/utilities.md
doc/development/utilities.md
+11
-11
doc/user/application_security/container_scanning/index.md
doc/user/application_security/container_scanning/index.md
+1
-1
No files found.
doc/administration/logs.md
View file @
9af54596
...
...
@@ -275,7 +275,7 @@ installations from source.
It contains the JSON version of the logs in
`application.log`
like the example below:
```
json
```
json
{
"severity"
:
"INFO"
,
"time"
:
"2020-01-14T13:35:15.466Z"
,
...
...
doc/ci/merge_request_pipelines/index.md
View file @
9af54596
...
...
@@ -100,7 +100,7 @@ Consider the following pipeline, with jobs `A`, `B`, and `C`. Imagine you want:
To achieve this, you can configure your
`.gitlab-ci.yml`
file as follows:
```
yaml
```
yaml
.only-default
:
&only-default
only
:
-
main
...
...
doc/ci/migration/circleci.md
View file @
9af54596
...
...
@@ -41,7 +41,7 @@ jobs:
Example of the same job definition in GitLab CI/CD:
```
yaml
```
yaml
job1
:
script
:
"
execute-script-for-job1"
```
...
...
doc/development/ee_features.md
View file @
9af54596
...
...
@@ -538,7 +538,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/shared/issuable/form/_default_templates.html.haml`
:
```
haml
```
haml
-
if
@project
.
feature_available?
(
:issuable_default_templates
)
=
render_ce
'shared/issuable/form/default_templates'
-
elsif
show_promotions?
...
...
doc/development/module_with_instance_variables.md
View file @
9af54596
...
...
@@ -68,7 +68,7 @@ objects are touching them, then it would be an acceptable use.
We especially allow the case where a single instance variable is used with
`||=`
to set up the value. This would look like:
```
ruby
```
ruby
module
M
def
f
@f
||=
true
...
...
@@ -85,7 +85,7 @@ we could easily add to the cop, we should do it.
Even if we could just disable the cop, we should avoid doing so. Some code
could be easily rewritten in simple form. Consider this acceptable method:
```
ruby
```
ruby
module
Gitlab
module
Emoji
def
emoji_unicode_version
(
name
)
...
...
@@ -104,7 +104,7 @@ cop is not smart enough to judge that this is fine.
On the other hand, we could split this method into two:
```
ruby
```
ruby
module
Gitlab
module
Emoji
def
emoji_unicode_version
(
name
)
...
...
@@ -127,7 +127,7 @@ Now the cop doesn't complain.
Put the disabling comment right after your code in the same line:
```
ruby
```
ruby
module
M
def
violating_method
@f
+
@g
# rubocop:disable Gitlab/ModuleWithInstanceVariables
...
...
@@ -137,7 +137,7 @@ end
If there are multiple lines, you could also enable and disable for a section:
```
ruby
```
ruby
module
M
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def
violating_method
...
...
@@ -167,13 +167,13 @@ point of view), making it extremely hard to track data dependency.
We're trying to use something like this instead:
```
haml
```
haml
=
render
'projects/commits/commit'
,
commit:
commit
,
ref:
ref
,
project:
project
```
And in the partial:
```
haml
```
haml
-
ref
=
local_assigns
.
fetch
(
:ref
)
-
commit
=
local_assigns
.
fetch
(
:commit
)
-
project
=
local_assigns
.
fetch
(
:project
)
...
...
doc/development/reusing_abstractions.md
View file @
9af54596
...
...
@@ -143,7 +143,7 @@ Service classes usually have an `execute` method, which can return a
In a successful case:
```
ruby
```
ruby
response
=
ServiceResponse
.
success
(
message:
'Branch was deleted'
)
response
.
success?
# => true
...
...
@@ -154,7 +154,7 @@ response.message # => 'Branch was deleted'
In a failed case:
```
ruby
```
ruby
response
=
ServiceResponse
.
error
(
message:
'Unsupported operation'
)
response
.
success?
# => false
...
...
@@ -165,7 +165,7 @@ response.message # => 'Unsupported operation'
An additional payload can also be attached:
```
ruby
```
ruby
response
=
ServiceResponse
.
success
(
payload:
{
issue:
issue
})
response
.
payload
[
:issue
]
# => issue
...
...
doc/development/utilities.md
View file @
9af54596
...
...
@@ -14,7 +14,7 @@ Refer to [`merge_hash.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/
-
Deep merges an array of hashes:
```
ruby
```
ruby
Gitlab
::
Utils
::
MergeHash
.
merge
(
[{
hello:
[
"world"
]
},
{
hello:
"Everyone"
},
...
...
@@ -25,7 +25,7 @@ Refer to [`merge_hash.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/
Gives:
```
ruby
```
ruby
[
{
hello:
...
...
@@ -41,7 +41,7 @@ Refer to [`merge_hash.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/
-
Extracts all keys and values from a hash into an array:
```
ruby
```
ruby
Gitlab
::
Utils
::
MergeHash
.
crush
(
{
hello:
"world"
,
this:
{
crushes:
[
"an entire"
,
"hash"
]
}
}
)
...
...
@@ -49,7 +49,7 @@ Refer to [`merge_hash.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/
Gives:
```
ruby
```
ruby
[
:hello
,
"world"
,
:this
,
:crushes
,
"an entire"
,
"hash"
]
```
...
...
@@ -69,7 +69,7 @@ Refer to [`override.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gi
Here's a simple example:
```
ruby
```ruby
class Base
def execute
end
...
...
@@ -86,7 +86,7 @@ Refer to [`override.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gi
This also works on modules:
```
ruby
```ruby
module Extension
extend ::Gitlab::Utils::Override
...
...
@@ -164,7 +164,7 @@ Refer to [`strong_memoize.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/
Instead of writing patterns like this:
```
ruby
```
ruby
class
Find
def
result
return
@result
if
defined?
(
@result
)
...
...
@@ -176,7 +176,7 @@ Refer to [`strong_memoize.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/
You could write it like:
```
ruby
```
ruby
class
Find
include
Gitlab
::
Utils
::
StrongMemoize
...
...
@@ -190,7 +190,7 @@ Refer to [`strong_memoize.rb`](https://gitlab.com/gitlab-org/gitlab/blob/master/
-
Clear memoization
```
ruby
```
ruby
class
Find
include
Gitlab
::
Utils
::
StrongMemoize
end
...
...
@@ -209,7 +209,7 @@ method level values, and optional method arguments.
A simple example that only uses the instance level customised values is:
```
ruby
```
ruby
class
UserAccess
extend
Gitlab
::
Cache
::
RequestCache
...
...
@@ -230,7 +230,7 @@ instance variable so the cache logic would be the same.
We can also set different strategies for different methods:
```
ruby
```
ruby
class
Commit
extend
Gitlab
::
Cache
::
RequestCache
...
...
doc/user/application_security/container_scanning/index.md
View file @
9af54596
...
...
@@ -323,7 +323,7 @@ at the logs that are produced by the container scanning analyzer in `container_s
The log contains a list of found vulnerabilities as a table, for example:
```
plaint
t
ext
```
plaintext
+------------+-------------------------+------------------------+-----------------------+------------------------------------------------------------------------+
| STATUS | CVE SEVERITY | PACKAGE NAME | PACKAGE VERSION | CVE DESCRIPTION |
+------------+-------------------------+------------------------+-----------------------+------------------------------------------------------------------------+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment