Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test sonar cloud #30

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ concurrency:
cancel-in-progress: false

jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# Build job
build:
runs-on: ubuntu-latest
Expand All @@ -39,10 +51,10 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
ruby-version: "3.1" # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
working-directory: './docs'
working-directory: "./docs"
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
Expand Down
3 changes: 3 additions & 0 deletions docs/_includes/fullscreen.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<button type="button" name="fullScreenButton" id="fullScreenButton" class="btn" onclick="fullScreenToggle()">
Full Screen View
</button>
1 change: 1 addition & 0 deletions docs/_includes/nhs-notify-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script src="{{ '/assets/js/nhs-notify.js' | relative_url }}"></script>
102 changes: 52 additions & 50 deletions docs/_includes/page-info-header.html
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
{% if page.is_not_draft %}{% else %} {% assign is_draft = true %} {% endif %} {%
assign wordWarning = 200 %} {% assign wordCount = content | number_of_words%} {%
assign readTime = wordCount | divided_by: 100.0 | ceil %} {% if page.sub_title
%}
<h1>{{ page.title }}</h1>
<p class="text-medium text-grey-dk-300 mb-0">{{ page.summary }}</p>
{% else %}
<h1>{{ page.title }}</h1>
{% endif %}
assign wordWarning = 200 %} {% assign wordCount = content | number_of_words%} {%
assign readTime = wordCount | divided_by: 100.0 | ceil %} {% if page.sub_title
%}
<h1>{{ page.title }}</h1>
<p class="text-medium text-grey-dk-300 mb-0">{{ page.summary }}</p>
{% else %}
<h1>{{ page.title }}</h1>
{% endif %}

<div class="page-info">
<p class="text-small text-grey-dk-300 mb-0">
{% if page.last_modified_date %} {{ page.last_modified_date | date:
"%Y-%m-%d"}} | {% else %} 2022-07-01 | {% endif %} 📑 {{ wordCount }} words
| ⏱ {{readTime}} mins {% if site.gh_edit_link and site.gh_edit_link_text and
site.gh_edit_repository and site.gh_edit_branch and site.gh_edit_view_mode
%} |
<a
href="{{ site.gh_edit_repository }}/commits/{{ site.gh_edit_branch }}{% if site.gh_edit_source %}/{{ site.gh_edit_source }}{% endif %}/{{ page.path }}"
id="edit-this-page"
>🧾 History</a
>
<div class="page-info">
<p class="text-small text-grey-dk-300 mb-0">
{% if page.last_modified_date %} {{ page.last_modified_date | date:
"%Y-%m-%d"}} | {% else %} 2022-07-01 | {% endif %} 📑 {{ wordCount }} words
| ⏱ {{readTime}} mins {% if site.gh_edit_link and site.gh_edit_link_text and
site.gh_edit_repository and site.gh_edit_branch and site.gh_edit_view_mode
%} |
<a
href="{{ site.gh_edit_repository }}/commits/{{ site.gh_edit_branch }}{% if site.gh_edit_source %}/{{ site.gh_edit_source }}{% endif %}/{{ page.path }}"
id="edit-this-page"
>🧾 History</a
>

{% endif %} | {% if page.author %} ✍ {{page.author}} {% else %} ✍ Ross
Buggins {% endif %} | {% if page.owner %} 🔑 {{page.owner}} {% else %} 🔑
Ross Buggins {% endif %}
</p>
{% endif %} | {% if page.author %} ✍ {{page.author}} {% else %} ✍ Ross
Buggins {% endif %} | {% if page.owner %} 🔑 {{page.owner}} {% else %} 🔑
Ross Buggins {% endif %}

<p class="text-small text-grey-dk-300 mb-0">
{% for tag in page.tags %}<a class="text-small" href="/tags/{{tag}}.html"
>{{tag}}</a
>,{% endfor %}
</p>
<p class="text-small text-grey-dk-300 mb-0">
{% for tag in page.tags %}<a class="text-small" href="/tags/{{tag}}.html"
>{{tag}}</a
>,{% endfor %}
</p>

{% if wordCount < wordWarning %}
<p class="text-small text-grey-dk-300 mb-0">
🚧 This page has less that {{wordWarning}} words. So it looks like this page
is still under construction.
</p>
{% endif %} {% if page.description %}
<p class="text-grey-dk-300 mb-0"><i>{{page.description}}</i></p>
{% endif %} {% if page.todo or is_draft %}
<p class="text-small text-grey-dk-300 mb-0"><b>Known Issues / Todo</b></p>
{% if wordCount < wordWarning %}
<p class="text-small text-grey-dk-300 mb-0">
🚧 This page has less that {{wordWarning}} words. So it looks like this page
is still under construction.
</p>
{% endif %} {% if page.description %}
<p class="text-grey-dk-300 mb-0"><i>{{page.description}}</i></p>
{% endif %} {% if page.todo or is_draft %}
<p class="text-small text-grey-dk-300 mb-0"><b>Known Issues / Todo</b></p>

<ul>
{% if page.is_not_draft %}{% else %}
<li class="text-small text-grey-dk-300 mb-0">
⛅ <b>This page is draft</b> and is subject to rapid change, and may not
be fully accurate or complete
</li>
{% endif %} {% for todo in page.todo %}
<li class="text-small text-grey-dk-300 mb-0">{{todo}}</li>
{% endfor %}
</ul>
{% endif %}
</div>
<ul>
{% if page.is_not_draft %}{% else %}
<li class="text-small text-grey-dk-300 mb-0">
⛅ <b>This page is draft</b> and is subject to rapid change, and may not
be fully accurate or complete
</li>
{% endif %} {% for todo in page.todo %}
<li class="text-small text-grey-dk-300 mb-0">{{todo}}</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% include fullscreen.html %}
</p>
<div></div>
24 changes: 15 additions & 9 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@

<html lang="{{ site.lang | default: 'en-US' }}">
{% include head.html %}
{% include nhs-notify-head.html %}

<body>
<a class="skip-to-main" href="#main-content">Skip to main content</a>
{% include icons/icons.html %}
{% if page.nav_enabled == true %}
{% include components/sidebar.html %}
{% include components/sidebar.html %}
{% elsif layout.nav_enabled == true and page.nav_enabled == nil %}
{% include components/sidebar.html %}
{% include components/sidebar.html %}
{% elsif site.nav_enabled != false and layout.nav_enabled == nil and page.nav_enabled == nil %}
{% include components/sidebar.html %}
{% include components/sidebar.html %}
{% endif %}
<div class="main" id="top">
{% include components/header.html %}
Expand All @@ -23,25 +25,29 @@
<div id="main-content" class="main-content">
<main>
{% if site.heading_anchors != false %}
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><use xlink:href=\"#svg-link\"></use></svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %}
{% include vendor/anchor_headings.html html=content beforeHeading="true" anchorBody="<svg viewBox=\"0 0 16
16\" aria-hidden=\"true\">
<use xlink:href=\"#svg-link\"></use>
</svg>" anchorClass="anchor-heading" anchorAttrs="aria-labelledby=\"%html_id%\"" %}
{% else %}
{{ content }}
{{ content }}
{% endif %}

{% if page.has_children == true and page.has_toc != false %}
{% include components/children_nav.html %}
{% include components/children_nav.html %}
{% endif %}
</main>
{% include components/footer.html %}
</div>
</div>
{% if site.search_enabled != false %}
{% include components/search_footer.html %}
{% include components/search_footer.html %}
{% endif %}
</div>

{% if site.mermaid %}
{% include components/mermaid.html %}
{% include components/mermaid.html %}
{% endif %}
</body>
</html>

</html>
Loading
Loading