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

Add package sticker #2511

Closed
wants to merge 2 commits into from
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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
^vignettes/[^-]+.gif$
^CRAN-SUBMISSION$
^CODE_OF_CONDUCT\.md$
^inst/hextools$
1 change: 1 addition & 0 deletions .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ linters: all_linters(
exclusions: list(
"inst/doc/creating_linters.R" = 1,
"inst/example/bad.R",
"inst/hextools/hexsticker.R",
"tests/testthat.R" = list(unused_import_linter = Inf),
"tests/testthat/default_linter_testcode.R",
"tests/testthat/dummy_packages",
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# lintr
# `{lintr}`: A 'Linter' for R Code

[![R build status](https://github.com/r-lib/lintr/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/lintr/actions)
[![codecov.io](https://codecov.io/gh/r-lib/lintr/branch/main/graphs/badge.svg)](https://app.codecov.io/gh/r-lib/lintr?branch=main)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/lintr)](https://cran.r-project.org/package=lintr)
[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html)

`{lintr}` provides [static code analysis for R](https://en.wikipedia.org/wiki/Static_program_analysis). It checks for adherence to a given style, identifying syntax errors and possible semantic issues, then reports them to you so you can take action. Watch lintr in action in the following animation:
## Overview <img src="man/figures/logo.png" align="right" width="200" />

`{lintr}` provides [static code analysis for R](https://en.wikipedia.org/wiki/Static_program_analysis). It checks for adherence to a given style, identifying syntax errors and possible semantic issues, then reports them to you so you can take action.

Watch `{lintr}` in action in the following animation:

![](man/figures/demo.gif "lintr demo")

Expand Down Expand Up @@ -69,3 +73,9 @@ Without further configuration, this will run the [default linters](https://lintr
## Code of Conduct

Please note that the lintr project is released with a [Contributor Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). By contributing to this project, you agree to abide by its terms.

## Acknowledgments

Hex sticker font is [IBM Plex Serif](https://fonts.google.com/specimen/IBM+Plex+Serif), and
the image is taken from icon made by [Freepik](https://www.freepik.com) and
available at [flaticon.com](https://www.flaticon.com/free-icon/lint-roller_6981024).
45 changes: 45 additions & 0 deletions inst/hextools/hexsticker.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
library(hexSticker)
library(magick)
library(showtext)
library(sysfonts)

# Loading Google fonts (http://www.google.com/fonts)
google_font_name <- "IBM Plex Serif"
font_add_google(google_font_name)

# Automatically use showtext to render text for future devices
showtext_auto()

project_root <- here::here()

# https://www.flaticon.com/free-icon/lint-roller_6981024
image <- image_read(file.path(project_root, "inst", "hextools", "lint-roller.png"))
manual_logo_path <- file.path(project_root, "man", "figures", "logo.png")

sticker(
# image
subplot = image,
s_x = 1,
s_y = 0.85,
s_width = 0.9,
s_height = 0.9,
# package name
package = "lintr",
p_color = "#545452",
p_family = google_font_name,
p_size = 45,
p_x = 1,
p_y = 1.55,
# border
h_color = "grey",
h_fill = "white",
# url
url = " https://lintr.r-lib.org/",
u_size = 10,
u_color = "grey",
# saving sticker
dpi = 600,
filename = manual_logo_path
)

pkgdown::build_favicons()
Binary file added inst/hextools/lint-roller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon.ico
Binary file not shown.
Loading