-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from dfe-analytical-services/add-lintr
Added draft lintr script
- Loading branch information
Showing
14 changed files
with
242 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '20 3 * * 0' | ||
|
||
name: lintr | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lintr: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: Run lintr scanning | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
# Running on mac as it's quicker to build | ||
- {os: macOS-latest, r: 'release'} | ||
|
||
permissions: | ||
contents: read # for checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@4e1feaf90520ec1215d1882fdddfe3411c08e492 | ||
with: | ||
r-version: 4.2.1 | ||
use-public-rspm: true | ||
|
||
- name: restore renv | ||
uses: r-lib/actions/setup-renv@v2 | ||
|
||
- name: Install lintr | ||
shell: Rscript {0} | ||
run: | | ||
renv::install("lintr") | ||
- name: Run lintr | ||
run: lintr::sarif_output(lintr::lint_dir("."), "lintr-results.sarif") | ||
shell: Rscript {0} | ||
continue-on-error: true | ||
|
||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: lintr-results.sarif | ||
wait-for-processing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
linters: linters_with_defaults( | ||
object_usage_linter = NULL | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,29 +7,54 @@ a11y_panel <- function() { | |
width = 12, | ||
h1("Accessibility statement"), | ||
br("This accessibility statement applies to the **application name**. | ||
This application is run by the Department for Education. We want as many people as possible to be able to use this application, | ||
and have actively developed this application with accessibilty in mind."), | ||
This application is run by the Department for Education. We want as | ||
many people as possible to be able to use this application, and have | ||
actively developed this application with accessibilty in mind."), | ||
h2("WCAG 2.1 compliance"), | ||
br("We follow the reccomendations of the ", a(href = "https://www.w3.org/TR/WCAG21/", "WCAG 2.1 requirements. ", onclick = "ga('send', 'event', 'click', 'link', 'IKnow', 1)"), "This application has been checked using the ", a(href = "https://github.com/ewenme/shinya11y", "Shinya11y tool "), ", which did not detect accessibility issues. | ||
This application also fully passes the accessibility audits checked by the ", a(href = "https://developers.google.com/web/tools/lighthouse", "Google Developer Lighthouse tool"), ". This means that this application:"), | ||
br( | ||
"We follow the reccomendations of the ", | ||
a( | ||
href = "https://www.w3.org/TR/WCAG21/", | ||
"WCAG 2.1 requirements. ", | ||
onclick = "ga('send', 'event', 'click', 'link', 'IKnow', 1)" | ||
), | ||
"This application has been checked using the ", | ||
a(href = "https://github.com/ewenme/shinya11y", "Shinya11y tool "), | ||
", which did not detect accessibility issues. | ||
This application also fully passes the accessibility audits checked | ||
by the ", | ||
a( | ||
href = "https://developers.google.com/web/tools/lighthouse", | ||
"Google Developer Lighthouse tool" | ||
), | ||
". This means that this application:" | ||
), | ||
tags$div(tags$ul( | ||
tags$li("uses colours that have sufficient contrast"), | ||
tags$li("allows you to zoom in up to 300% without the text spilling off the screen"), | ||
tags$li("has its performance regularly monitored, with a team working on any feedback to improve accessibility for all users") | ||
tags$li("allows you to zoom in up to 300% without the text spilling | ||
off the screen"), | ||
tags$li("has its performance regularly monitored, with a team | ||
working on any feedback to improve accessibility for all | ||
users") | ||
)), | ||
h2("Limitations"), | ||
br("We recognise that there are still potential issues with accessibility in this application, but we will continue | ||
to review updates to technology available to us to keep improving accessibility for all of our users. For example, these | ||
are known issues that we will continue to monitor and improve:"), | ||
br("We recognise that there are still potential issues with | ||
accessibility in this application, but we will continue to review | ||
updates to technology available to us to keep improving accessibility | ||
for all of our users. For example, these are known issues that we will | ||
continue to monitor and improve:"), | ||
tags$div(tags$ul( | ||
tags$li("List"), | ||
tags$li("known"), | ||
tags$li("limitations, e.g."), | ||
tags$li("Alternative text in interactive charts is limited to titles and could be more descriptive (although this data is available in csv format)") | ||
tags$li("Alternative text in interactive charts is limited to titles | ||
and could be more descriptive (although this data is | ||
available in csv format)") | ||
)), | ||
h2("Feedback"), | ||
br( | ||
"If you have any feedback on how we could further improve the accessibility of this application, please contact us at", | ||
"If you have any feedback on how we could further improve the | ||
accessibility of this application, please contact us at", | ||
a(href = "mailto:[email protected]", "[email protected]") | ||
) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,8 @@ customDisconnectMessage <- function(refresh = "Refresh page", | |
}, | ||
if (!is.null(publication_name)) { | ||
tags$p( | ||
"All the data used in this dashboard can also be viewed or downloaded via the ", | ||
"All the data used in this dashboard can also be viewed or | ||
downloaded via the ", | ||
tags$a( | ||
href = publication_link, | ||
publication_name | ||
|
@@ -53,7 +54,10 @@ customDisconnectMessage <- function(refresh = "Refresh page", | |
}, | ||
tags$p( | ||
"Please contact", | ||
tags$a(href = "mailto:[email protected]", "[email protected]"), | ||
tags$a( | ||
href = "mailto:[email protected]", | ||
"[email protected]" | ||
), | ||
"with details of any problems with this resource." | ||
) | ||
# ), | ||
|
Oops, something went wrong.