{"id":26466752,"url":"https://github.com/luansv1495/xulin","last_synced_at":"2025-08-22T19:05:27.259Z","repository":{"id":65153015,"uuid":"582817789","full_name":"luansv1495/xulin","owner":"luansv1495","description":"Tool for automated architecture testing","archived":false,"fork":false,"pushed_at":"2023-05-30T20:03:43.000Z","size":1014,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-18T08:41:49.088Z","etag":null,"topics":["architecture","automation","javascript","test","testing","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/luansv1495.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":"2022-12-28T00:25:19.000Z","updated_at":"2023-03-03T15:21:25.000Z","dependencies_parsed_at":"2024-10-20T20:33:07.936Z","dependency_job_id":null,"html_url":"https://github.com/luansv1495/xulin","commit_stats":{"total_commits":115,"total_committers":3,"mean_commits":"38.333333333333336","dds":"0.20869565217391306","last_synced_commit":"de282acece0d56b59806fac7a1280431b4d11af6"},"previous_names":["luansv1495/nata-cli"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luansv1495%2Fxulin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luansv1495%2Fxulin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luansv1495%2Fxulin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luansv1495%2Fxulin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luansv1495","download_url":"https://codeload.github.com/luansv1495/xulin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244430141,"owners_count":20451605,"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":["architecture","automation","javascript","test","testing","typescript"],"created_at":"2025-03-19T12:38:09.559Z","updated_at":"2025-03-19T12:38:10.066Z","avatar_url":"https://github.com/luansv1495.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xulin\n\nArchitecture test automation\n\n[![Continuous integration](https://github.com/luansv1495/xulin/actions/workflows/ci.yml/badge.svg)](https://github.com/luansv1495/xulin/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/luansv1495/xulin/badge.svg?branch=main)](https://coveralls.io/github/luansv1495/xulin?branch=main)\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n- [Configuration](#configuration)\n  - [Rules](#rules)\n- [License](#license)\n\n## Getting Started\n\nInstall Xulin using [`npm`](https://www.npmjs.com/package/xulin):\n\n```bash\nnpm install --save-dev xulin\n```\n\nAdd the following section to your `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"test:arch\": \"xulin .\"\n  }\n}\n```\n\nBefore running you must create the configuration file `xulin.config.json`:\n\n```json\n{\n  \"rules\": []\n}\n```\n\nFinally, run `npm run test:arch` and Xulin will print this message:\n\n```bash\nCheck Suites: 0 failed, 0 skipped, 0 passed, 0 total.\nChecks:       0 failed, 0 passed, 0 total.\nExec time:    00:00:00.001\n```\n\n## Configuration\n\n### Rules\n\n1. Check if the files in a folder do not have dependencies on the specified directories:\n\n```json\n{\n  \"name\": \"no-dependencies\",\n  \"folder\": \"source/configs\",\n  \"folders\": [\"source/pages\"]\n}\n```\n\n2. Check that folder names in a directory follow the specified folder name:\n\n```json\n{\n  \"name\": \"folder-name-in-folder\",\n  \"names\": [\"services\", \"pages\", \"config\"],\n  \"folder\": \"source\"\n}\n```\n\n3. Check the maximum amount of files in a directory:\n\n```json\n{\n  \"name\": \"max-files-in-folder\",\n  \"quantity\": 2,\n  \"folder\": \"source/services\"\n}\n```\n\n4. Check the maximum amount of folders in a directory:\n\n```json\n{\n  \"name\": \"max-folders-in-folder\",\n  \"quantity\": 2,\n  \"folder\": \"source/services\"\n}\n```\n\n5. Check the length of filenames in a directory:\n\n```json\n{\n  \"name\": \"filename-size-in-folder\",\n  \"min\": 3,\n  \"max\": 10,\n  \"folder\": \"source\"\n}\n```\n\n6. Check the length of folders names in a directory:\n\n```json\n{\n  \"name\": \"folder-name-size-in-folder\",\n  \"min\": 3,\n  \"max\": 10,\n  \"folder\": \"source\"\n}\n```\n\n7. Check that files in a directory follow specified patterns:\n\n```json\n{\n  \"name\": \"filename-pattern-in-folder\",\n  \"patterns\": [\"*.ts\"],\n  \"folder\": \"source/services\"\n}\n```\n\nTo skip a rule use the skip field:\n\n```json\n{\n  \"name\": \"filename-pattern-in-folder\",\n  \"patterns\": [\"*.ts\"],\n  \"folder\": \"source/services\",\n  \"skip\": true\n}\n```\n\n## License\n\nXulin is [MIT licensed](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluansv1495%2Fxulin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluansv1495%2Fxulin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluansv1495%2Fxulin/lists"}