{"id":17136687,"url":"https://github.com/vigoo/simpp","last_synced_at":"2026-02-06T18:36:36.818Z","repository":{"id":39848204,"uuid":"119548621","full_name":"vigoo/simpp","owner":"vigoo","description":"A simple pretty printer library","archived":false,"fork":false,"pushed_at":"2024-08-20T01:12:49.000Z","size":186,"stargazers_count":0,"open_issues_count":11,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-21T10:34:10.478Z","etag":null,"topics":["library","pretty-printer","scala"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vigoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-30T14:38:20.000Z","updated_at":"2023-02-22T07:13:15.000Z","dependencies_parsed_at":"2024-12-19T10:40:52.935Z","dependency_job_id":"0d09e740-9b0c-4fc1-b1a0-13824bc9f9ce","html_url":"https://github.com/vigoo/simpp","commit_stats":{"total_commits":122,"total_committers":3,"mean_commits":"40.666666666666664","dds":"0.19672131147540983","last_synced_commit":"51db09dcc287b667611b567d7c507151f2041f4e"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vigoo/simpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vigoo%2Fsimpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vigoo%2Fsimpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vigoo%2Fsimpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vigoo%2Fsimpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vigoo","download_url":"https://codeload.github.com/vigoo/simpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vigoo%2Fsimpp/sbom","scorecard":{"id":921134,"data":{"date":"2025-08-11","repo":{"name":"github.com/vigoo/simpp","commit":"51db09dcc287b667611b567d7c507151f2041f4e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":9,"reason":"Found 15/16 approved changesets -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/vigoo/simpp/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/vigoo/simpp/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/vigoo/simpp/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/vigoo/simpp/release.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/vigoo/simpp/release.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/vigoo/simpp/release.yaml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/ci.yaml:27","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Warn: no topLevel permission defined: .github/workflows/release.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-25T03:09:09.414Z","repository_id":39848204,"created_at":"2025-08-25T03:09:09.414Z","updated_at":"2025-08-25T03:09:09.414Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29172618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T16:33:35.550Z","status":"ssl_error","status_checked_at":"2026-02-06T16:33:30.716Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library","pretty-printer","scala"],"created_at":"2024-10-14T20:05:02.463Z","updated_at":"2026-02-06T18:36:36.802Z","avatar_url":"https://github.com/vigoo.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simpp\n[![Build Status](https://travis-ci.org/vigoo/simpp.svg?branch=master)](https://travis-ci.org/vigoo/simpp)\n[![codecov](https://codecov.io/gh/vigoo/simpp/branch/master/graph/badge.svg)](https://codecov.io/gh/vigoo/simpp)\n[![Apache 2 License License](http://img.shields.io/badge/license-APACHE2-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\nA *simple pretty printer* library primarily targeting source code generation.\n\nBuilt on top of [eff](http://atnos-org.github.io/eff/).\n\n\n## Usage\n\nAdd the following dependency:\n\n```scala\nlibraryDependencies += \"io.github.vigoo\" %% \"simpp\" % \"0.2.0\"\n```\n\nUse the `PrettyPrint[AdditionalFx]` trait as a context to define the pretty printer. This defines the pretty printer\ncontext `PrettyPrinterContext` which is a combination of a writer and state effect plus the given effects specified in\nthe `AdditionalFx` parameter. The pretty printer functions must have type `PP[A]` which is in fact \n`Eff[PrettyPrinterContext[AdditionalFx], A]`. \n\nYou have to define the `runAdditionalFx` method to specify how the custom effects are to be interpreted.\n\nIn the simple case there are no additional effects:\n\n```scala\nimport io.github.vigoo.simpp._\nimport org.atnos.eff.{Eff, NoFx}\n\nobject SamplePrettyPrint extends PrettyPrint[NoFx] {\n  override def runAdditionalFx(f: PP[Unit]): Eff[PrettyPrinterContext[NoFx], Unit] = f\n \n  // Define pretty printing functions here\n  \n  // Define implicit pretty printers here \n}\n``` \n\nThen you will have a `SamplePrettyPrint.print` method for any value of type `T` with an implicit \n`PrettyPrinter[T, AdditionalFx]` instance.\n\nThe idea is to:\n- Specify pretty printing functions of type `PP[A]`. There is a couple of basic ones available in the `PrettyPrint` \ntrait.\n- Specify implicit instances of the `PrettyPrinter` type class\n- Use `SamplePrettyPrint.print` to render values to strings\n\n### Pretty printing functions\nPretty printing functions can be composed from more atomic pretty printing functions. The basic ones are the following:\n\n- `empty: PP[Unit]`\n- `append(value: String): PP[Unit]`\n- `indent(): PP[Unit]`\n- `unindent(): PP[Unit]`\n- `pretty[I](value: I)(implicit prettyPrinter: PrettyPrinter[I])`\n\nThere are additional functions to wrap values, render sequences, indent blocks, etc.  \n\n### Pretty printer instances\nThe `PrettyPrinter` type class provides a single method `prettyPrint` that can be defined by composing the above\ndefined *pretty printer functions*.\n\nFor example:\n\n```scala\nimplicit val expressionPrettyPrinter: PrettyPrinter[BcExpression, NoFx] = {\n  case BcExpressions.Number(value) =\u003e code(value.toString)\n  case BcExpressions.Add(x, y) =\u003e parenthesed(x) \u003e\u003e space \u003e\u003e code(\"+\") \u003e\u003e space \u003e\u003e parenthesed(y)\n  case BcExpressions.Sub(x, y) =\u003e parenthesed(x) \u003e\u003e space \u003e\u003e code(\"-\") \u003e\u003e space \u003e\u003e parenthesed(y)\n  case BcExpressions.Mul(x, y) =\u003e parenthesed(x) \u003e\u003e space \u003e\u003e code(\"*\") \u003e\u003e space \u003e\u003e parenthesed(y)\n  case BcExpressions.Div(x, y) =\u003e parenthesed(x) \u003e\u003e space \u003e\u003e code(\"/\") \u003e\u003e space \u003e\u003e parenthesed(y)\n}\n```\n\n### Additional effects\nAdditional effects such as custom state can be applied to the pretty printers `AdditionalFx` type parameter.\n\nFor example the code below keeps track whether we are inside a string or not:\n\n```scala\ncase class BashPrettyPrinterState(inString: Boolean)\n\nobject BashPrettyPrint extends PrettyPrint[Fx.fx1[State[BashPrettyPrinterState, ?]]] {\n  override def runAdditionalFx(f: PP[Unit]): Eff[PrettyPrinterContext[NoFx], Unit] =\n    f.evalState(BashPrettyPrinterState(inString = false))\n\n  type BashFx = Fx.fx1[State[BashPrettyPrinterState, ?]]\n  \n  def getBashState: Eff[R, BashPrettyPrinterState] =\n    get[R, BashPrettyPrinterState]\n\n  def setBashState(newState: BashPrettyPrinterState): Eff[R, Unit] =\n    put[R, BashPrettyPrinterState](newState)\n\n  def inString[A](inner: Eff[R, A]): Eff[R, A] =\n    for {\n      state \u003c- getBashState\n      _ \u003c- setBashState(state.copy(inString = true))\n      result \u003c- inner\n      _ \u003c- setBashState(state.copy(inString = state.inString))\n    } yield result\n\n  // ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvigoo%2Fsimpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvigoo%2Fsimpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvigoo%2Fsimpp/lists"}