{"id":19878729,"url":"https://github.com/ironsource/dslint","last_synced_at":"2025-08-25T10:22:15.574Z","repository":{"id":44987995,"uuid":"287059087","full_name":"ironSource/dslint","owner":"ironSource","description":"A lightweight Android linter for Kotlin DSL aimed to solve the problem of verifying mandatory DSL attributes at compile time.","archived":false,"fork":false,"pushed_at":"2023-03-23T18:57:41.000Z","size":690,"stargazers_count":69,"open_issues_count":4,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-02T13:43:52.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/ironSource.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-12T16:10:01.000Z","updated_at":"2025-03-31T19:15:09.000Z","dependencies_parsed_at":"2022-07-13T04:20:50.030Z","dependency_job_id":null,"html_url":"https://github.com/ironSource/dslint","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ironSource/dslint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ironSource%2Fdslint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ironSource%2Fdslint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ironSource%2Fdslint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ironSource%2Fdslint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ironSource","download_url":"https://codeload.github.com/ironSource/dslint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ironSource%2Fdslint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272045432,"owners_count":24864021,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-12T17:06:28.780Z","updated_at":"2025-08-25T10:22:15.557Z","avatar_url":"https://github.com/ironSource.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"DSLint\n============\n\nA lightweight Android linter for Kotlin DSL aimed to solve the problem of verifying mandatory DSL attributes at compile time.\n---\n \nUsage\n---\n```kotlin\n@DSLint\ninterface SomeDSLApi {\n\n    @set:DSLMandatory(message = \"ID please\")\n    var id: String\n\n    @set:DSLMandatory(group = \"name\")\n    var firstName: String\n\n    @set:DSLMandatory(group = \"name\")\n    var fullName: String\n\n    var optional: String\n\n    @DSLMandatory\n    fun inner(block: SomeInnerDSLApi.() -\u003e Unit)\n}\n```\n\n![Sample](images/sample.png)\n\nAnnotations\n---\n#### `@DSLint`\nUse on a DSL class/interface that you want DSLint to verify.\n\n#### `@DSLMandatory`\nUse on mandatory DSL properties setters or functions.\nProperties/functions annotated by this will generate a lint error if not\ndefined in the DSL lambda.\n\nGrouping\n---\nMandatory properties can be grouped together using the `group` attribute\nin the `@DSLMandatory` annotation.\nDSLint will verify that at least one of the properties in the group is defined.\n```kotlin\n@DSLint\ninterface SomeDSLApi {\n\n    @set:DSLMandatory(group = \"name\")\n    var firstName: String\n\n    @set:DSLMandatory(group = \"name\")\n    var fullName: String\n}\n```\n\nCustom message\n---\nCustom error message can be defined using the `message` attribute in the `@DSLMandatory` annotation.\nA custom message for grouped properties should be defined on the first property of the group.\n```kotlin\n@DSLint\ninterface SomeDSLApi {\n\n    @set:DSLMandatory(message = \"ID please\")\n    var id: String\n}\n```\n![Sample](images/sample_custom.png)\n\nQuickfix\n---\nDSLint offers quick fixes for adding missing mandatory properties. \n![Sample](images/sample_quickfix.png)\n\nRequirements\n--------\nDSLint will always show errors inside Android Studio.\nIn order for DSLint to also work on the gradle lint task (for release builds) the following conditions must be met:\nGradle version \u003e= 6.3\nAndroid Gradle Plugin \u003e= 4.0.1\n\nDownload\n--------\n#### For app developers\n```groovy\ndependencies {\n    implementation 'com.ironsource.aura.dslint:dslint:1.0.3'\n}\n```\n\n#### For SDK developers (DSLint linter will run on the app dependant on the SDK)\n```groovy\ndependencies {\n    implementation 'com.ironsource.aura.dslint:dslint-annotations:1.0.3'\n    lintPublish 'com.ironsource.aura.dslint:dslint-checks:1.0.3'\n}\n```\n\nLicense\n-------\n\nCopyright (c) 2020 Hanan Rofe Haim\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fironsource%2Fdslint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fironsource%2Fdslint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fironsource%2Fdslint/lists"}