{"id":15977842,"url":"https://github.com/servb/hs-static-analysis","last_synced_at":"2026-02-28T18:02:37.740Z","repository":{"id":130365347,"uuid":"222311920","full_name":"SerVB/hs-static-analysis","owner":"SerVB","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-15T22:42:23.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-04T07:26:20.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SerVB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-11-17T21:05:10.000Z","updated_at":"2019-12-15T22:42:25.000Z","dependencies_parsed_at":"2023-04-14T03:04:21.222Z","dependency_job_id":null,"html_url":"https://github.com/SerVB/hs-static-analysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SerVB%2Fhs-static-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SerVB%2Fhs-static-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SerVB%2Fhs-static-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SerVB%2Fhs-static-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SerVB","download_url":"https://codeload.github.com/SerVB/hs-static-analysis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240267577,"owners_count":19774213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-07T23:02:15.249Z","updated_at":"2026-02-28T18:02:37.706Z","avatar_url":"https://github.com/SerVB.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# HS Static Analysis\nWe've decided to use ![Kotlin](https://img.shields.io/badge/kotlin-❤-blue.svg).\n\nOpen PRs!\n\n## Code style\nPlease use official Kotlin style guide.\n\n## What to do\nWe need the following parts:\n\n### Interface: Stepik step checker\nThis is a class that receives HTML text (like a Stepik text) and returns a verdict: is the text right or not.\n\nThink about the signature of the function.\n\n### Implementations\nThen create some classes implementing the interface. You can use libraries like the  [jsoup](https://jsoup.org/download) to parse the text.\n\nDon't forget that some checks are irrelevant for text in the `\u003ccode\u003e` tag.\n\nThe list of checkers:\n\nTODO. First of all, choose and create about three implementations (better from the start). After completing all the parts, implement others:\n1. **Usage of `args: Array\u003cString\u003e`** in Kotlin coding tasks templates.\n1. **Hyphen** (-) instead of a *dash* (–) [how to check: search for space-hyphen-space].\n1. **Double hyphen** instead of a *dash*.\n1. Test count in a coding task **is small** [let's say `MINIMUM_TEST_COUNT = 5`].\n1. **Repeating spaces** (don't forget about `\u0026nbsp;`).\n1. **Wrong spaces** near a `\u003ccode\u003e` block [everything except punctuation marks must be spaced].\n1. **Lesson/lessons** instead of *topic/topics*.\n1. **Same names** of tasks in the topic.\n1. **Unusual quotes** (‘’ or “” – like commas) instead of *normal ones* (' or \") [\u003c--- this happens when you copy-paste your text from Google Docs to Stepik].\n1. Gender neutrality (**she he** instead of they, don't forget about **her his**).\n1. **Usage of `Scanner`** class in Kotlin coding tasks templates.\n1. **Cyrillic letters**.\n1. Wrong answer hints **aren't set** [we are going to add hints like \"which paragraph contains the needed info\"].\n1. **Multiple HINTs** in the task.\n\nDone:\n\nWhen you add a checker, move it here.\n\n### Tests\nProvide tests for every implementation.\n\n### CI\nI will set up GitHub Actions once there is a test.\n\n### Mechanism to suppress warnings\nWe need a way to suppress wrong warnings.\n\nHyperskill supports the `[META]hidden text[/META]` tag. As you can already understand, the `hidden text` is visible at Stepik and is invisible at HS.\n\nSo let's use the following syntax to suppress warnings:\n```\n[META][SUPPRESS RULE=\"rule_name\" SYMBOLS=\"symbol_count\"][/META]\n```\n\nImplementations must ignore `symbol_count` symbols of the first visible text after the `[SUPPRESS]` tag.\n\nFor example, you have the source:\n\n`Here we show some [META][SUPPRESS RULE=\"multiple_spaces\" SYMBOLS=\"3\"][/META] \u0026nbsp; spaces for you.`\n\nAs you see, there are 4 spaces. At HS, it will be visible like this (I use underscores for demonstration purposes):\n\n`Here we show some____spaces for you.`\n\nAnd the `multiple_spaces` checker should see this text like this:\n\n`Here we show some_spaces for you.`\n\nSo there is no warning.\n\nAdd tests for this feature.\n\n### HS crawler\nWe need some code that goes through HS topics and calls all the implementations on them.\n\nYou can use the following ways to collect the texts:\n1. [HS API](https://hyperskill.org/api/steps?format=api) ([docs](https://hyperskill.org/api/docs/)).\n1. Stepik API.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservb%2Fhs-static-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fservb%2Fhs-static-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fservb%2Fhs-static-analysis/lists"}