{"id":18048121,"url":"https://github.com/startautomating/scriptcop","last_synced_at":"2025-04-10T09:49:22.791Z","repository":{"id":16689572,"uuid":"19446009","full_name":"StartAutomating/ScriptCop","owner":"StartAutomating","description":"ScriptCop is a static analysis and testing tool for Windows PowerShell","archived":false,"fork":false,"pushed_at":"2020-08-10T08:28:04.000Z","size":266,"stargazers_count":42,"open_issues_count":1,"forks_count":4,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-24T08:46:08.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StartAutomating.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}},"created_at":"2014-05-05T06:16:16.000Z","updated_at":"2025-01-06T09:30:41.000Z","dependencies_parsed_at":"2022-09-14T08:50:56.913Z","dependency_job_id":null,"html_url":"https://github.com/StartAutomating/ScriptCop","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FScriptCop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FScriptCop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FScriptCop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FScriptCop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StartAutomating","download_url":"https://codeload.github.com/StartAutomating/ScriptCop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248197463,"owners_count":21063619,"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-30T20:11:41.082Z","updated_at":"2025-04-10T09:49:22.753Z","avatar_url":"https://github.com/StartAutomating.png","language":"PowerShell","readme":"\r\nScriptCop [1.6]\r\n===============\r\n\r\nA PowerShell Static Analysis Tool to help your scripts follow the rules.\r\n---------------\r\n\r\n### Commands\r\n-----------------------------\r\n|      Verb|Noun            |\r\n|---------:|:---------------|\r\n|   Disable|-CommandCoverage|\r\n|    Enable|-CommandCoverage|\r\n|       Get|-CommandCoverage|\r\n|          |-ScriptCopFixer |\r\n|          |-ScriptCopPatrol|\r\n|          |-ScriptCopRule  |\r\n|  Register|-ScriptCopFixer |\r\n|          |-ScriptCopPatrol|\r\n|          |-ScriptCopRule  |\r\n|    Repair|-Command        |\r\n|      Show|-ScriptCoverage |\r\n|      Test|-Command        |\r\n|          |-Module         |\r\n|Unregister|-ScriptCopFixer |\r\n|          |-ScriptCopPatrol|\r\n|          |-ScriptCopRule  |\r\n-----------------------------\r\nScriptCop is a static analysis and testing tool for PowerShell.  It helps make sure your scripts follow the rules.\r\n\r\n\r\n### Using ScriptCop for Static Analysis\r\n\r\nYou can run pipe in a command or a module to perform static analysis \r\n~~~Powershell\r\nfunction foo() {\r\n\r\n}\r\n\r\nGet-Command foo | Test-Command\r\n~~~\r\n\r\n![What's Wrong with Foo](Assets/ScriptCop_SampleOutput.png)\r\n\r\n\r\n\r\nWhen using ScriptCop analyzes your scripts, it it doesn't run your code, but it examines your code for a set of well-known problems.\r\nYou can write custom rules to flag bad scripting style, or you can use the dozens of rules built into ScriptCop.\r\n\r\n### Testing with ScriptCop\r\n\r\nYou can also use ScriptCop to test your modules.  \r\nBy default, every module command's examples and any demos become test cases for your module.  \r\nYou can also write your own tests (.test.ps1) files to make sure different parts are working.\r\n\r\nYou can declare a .ScriptCop.psd1 manifest to group your tests and control what runs by default.\r\n\r\nFor instance, here is the ScriptCop.ScriptCop.psd1:\r\n\r\n~~~Powershell\r\n@{\r\n    Demo = \"A Quick Intro to ScriptCop\"\r\n    Coverage = 'ScriptCoverage'\r\n    ExampleTests = 'Show-ScriptCoverage:1'\r\n    RuleGetters = 'Get-ScriptCopRule:1', 'Get-ScriptCopPatrol:1', 'Get-ScriptCopFixer:1'\r\n    ScriptCop = '*'\r\n}\r\n~~~\r\n\r\nEach key is the name of a test group.  \r\n\r\nThe group \"ScriptCop\" is a special group, and it describes the name of static analysis rules you would like to run on each command.\r\n\r\n\r\n\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartautomating%2Fscriptcop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstartautomating%2Fscriptcop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartautomating%2Fscriptcop/lists"}