Repository Analysis

directus/directus

The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.

0.6 Likely human-written View on GitHub
0.6
Adjusted Score
0.6
Raw Score
100%
Time Factor
2026-05-29
Last Push
36,021
Stars
TypeScript
Language
662,798
Lines of Code
4022
Files
395
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 2LOW 393

Pattern Findings

395 matches across 7 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers190 hits · 195 pts
SeverityFileLineSnippet
LOWapp/src/composables/use-mime-type-filter.ts9export function parseGlobalMimeTypeAllowList(allowList: string[] | undefined): string[] | undefined {
LOWapp/src/composables/use-nested-validation.ts14 function updateNestedValidationErrors(fieldKey: string, errors: any[]) {
LOWapp/src/composables/use-nested-validation.ts18 function getNestedValidationErrors() {
LOWapp/src/composables/use-nested-validation.ts24 function resetNestedValidationErrors() {
LOWapp/src/composables/use-nested-validation.ts29export function useInjectNestedValidation() {
LOWapp/src/composables/use-field-tree.ts157 function getRelationTypeAndRelatedCollections(field: Field): {
LOWapp/src/composables/use-focus-trap-manager.ts26export function useInjectFocusTrapManager() {
LOWapp/src/composables/use-validation-error-details.ts17export function useValidationErrorDetails(validationErrors: Ref<ValidationError[]>, fields: Ref<Field[]>) {
LOWapp/src/composables/use-validation-error-details.ts66 function getCustomValidationMessage() {
LOWapp/src/composables/use-validation-error-details.ts79 function getDefaultValidationMessage(validationError: ValidationErrorWithDetails) {
LOWapp/src/panels/time-series/panel-time-series.vue378 function getFirstDayOfNWeeksForYear(numberOfWeeks: number, year: number) {
LOWapp/src/panels/pie-chart/panel-pie-chart.vue237function checkMatchingConditionalFill(value: string | number, format: ConditionalFillFormat): boolean {
LOWapp/src/panels/bar-chart/panel-bar-chart.vue303 function checkMatchingConditionalFill(format: ConditionalFillFormat): boolean {
LOWapp/src/stores/insights.ts302 function setErrorsFromResponseData(responseErrors: any[]): string[] {
LOWapp/src/stores/flows.ts46 function getManualFlowsForCollection(collection: string): FlowRaw[] {
LOWapp/src/stores/permissions.ts40 function getNestedDynamicVariableFields(rawPermissions: Record<string, CollectionPermission>) {
LOWapp/src/stores/fields.ts329 function getPrimaryKeyFieldForCollection(collection: string): Field | null {
LOWapp/src/stores/fields.ts345 function getFieldsForCollectionAlphabetical(collection: string): Field[] {
LOWapp/src/stores/fields.ts357 function getFieldsForCollectionSorted(collection: string): Field[] {
LOWapp/src/utils/get-route.ts17function isAccessibleSystemCollection(collection: string): collection is keyof typeof accessibleSystemCollections {
LOWapp/src/utils/clear-hidden-fields-by-condition.ts14export function clearHiddenFieldsByCondition(edits: Item, fields: Field[], defaultValues: any, item: any): Item {
LOWapp/src/utils/get-default-values-from-fields.ts4export function getDefaultValuesFromFields(fields: Field[] | Ref<Field[]>): ComputedRef<Record<string, any>> {
LOWapp/src/utils/get-default-interface-for-type.ts31export function getDefaultInterfaceForType(type: Type): string {
LOWapp/src/utils/reconstruct-comparison-html.ts4export function reconstructComparisonHtml(
LOWapp/src/utils/validate-item.ts56 function applyRulesForRequiredFields(fieldKey: string, field: Field, isNew: boolean) {
LOWapp/src/utils/get-literal-interpolated-translation.ts10export function getLiteralInterpolatedTranslation(translation: string, keepCurlyBrackets = false) {
LOWapp/src/utils/render-string-template.ts42export function renderPlainStringTemplate(template: string, item?: Record<string, any> | null): string | null {
LOWapp/src/utils/render-string-template.ts54export function renderDisplayStringTemplate(
LOWapp/src/utils/add-related-primary-key-to-fields.ts18export function addRelatedPrimaryKeyToFields(currentCollection: string, fields: string[]): string[] {
LOWapp/src/utils/format-validation-structure.ts165export function errorMatchesValidationRule(
LOWapp/src/utils/format-date-picker-model-value.ts22export function formatDatePickerModelValue(
LOWapp/src/utils/flatten-grouped-collections.ts15export function flattenGroupedCollections(collections: Collection[]): Collection[] {
LOWapp/src/utils/format-items-count.ts12export function formatItemsCountPaginated({
LOWapp/src/utils/geometry/basemap.ts36export function getStyleFromBasemapSource(basemap: BasemapSource): Style | string {
LOWapp/src/components/v-form/v-form.vue418function getFirstVisibleFieldClass(index: number) {
LOWapp/src/components/v-form/v-form.vue430function getComparisonIndicatorClasses(field: TFormField, isGroup = false) {
LOW…c/components/v-checkbox-tree/VCheckboxTreeCheckbox.vue355function getRecursiveChildrenValues(mode: 'all' | 'branch' | 'leaf', children: Record<string, any>[] = props.children) {
LOW…c/components/v-checkbox-tree/VCheckboxTreeCheckbox.vue362 function getChildrenValuesRecursive(children: Record<string, any>[]) {
LOWapp/src/layouts/calendar/index.ts301 async function resetPresetAndRefresh() {
LOWapp/src/layouts/cards/index.ts164 async function resetPresetAndRefresh() {
LOWapp/src/layouts/tabular/index.ts159 async function resetPresetAndRefresh() {
LOWapp/src/layouts/map/index.ts353 async function resetPresetAndRefresh() {
LOWapp/src/layouts/kanban/index.ts392 async function resetPresetAndRefresh() {
LOWapp/src/ai/models.ts38export function buildCustomModelDefinition(provider: ProviderType, modelId: string): AppModelDefinition {
LOWapp/src/ai/composables/use-visual-element-highlight.ts5export function useVisualElementHighlight() {
LOWapp/src/ai/components/ai-context-menu.vue137function handleCollectionFromItemsList(collection: Collection) {
LOWapp/src/modules/settings/routes/ai/overview.test.ts133function getTranslationDefaultField(wrapper: ReturnType<typeof mount>) {
LOW…outes/data-model/utils/get-junction-collection-name.ts3export function getAutomaticJunctionCollectionName(collectionA: string, field: string) {
LOW…settings/routes/data-model/field-detail/store/index.ts16export function syncFieldDetailStoreProperty(path: string, defaultValue?: any) {
LOW…outes/data-model/field-detail/store/alterations/m2m.ts108export function preventCircularConstraint(updates: StateUpdates, _state: State, { getCurrent }: HelperFunctions) {
LOW…outes/data-model/field-detail/store/alterations/m2m.ts123export function autoGenerateJunctionFields(updates: StateUpdates, state: State, { getCurrent }: HelperFunctions) {
LOW…outes/data-model/field-detail/store/alterations/m2m.ts281export function matchJunctionCollectionName(updates: StateUpdates) {
LOW…outes/data-model/field-detail/store/alterations/m2m.ts291export function setRelatedOneFieldForCorrespondingField(updates: StateUpdates) {
LOW…a-model/field-detail/store/alterations/translations.ts104export function preventCircularConstraint(updates: StateUpdates, _state: State, { getCurrent }: HelperFunctions) {
LOW…a-model/field-detail/store/alterations/translations.ts366export function matchJunctionCollectionName(updates: StateUpdates) {
LOW…outes/data-model/field-detail/store/alterations/o2m.ts63export function preventCircularConstraint(updates: StateUpdates, state: State) {
LOW…outes/data-model/field-detail/store/alterations/o2m.ts80export function useExistingRelationValues(updates: StateUpdates) {
LOW…outes/data-model/field-detail/store/alterations/o2m.ts97export function generateRelatedCollection(updates: StateUpdates) {
LOW…outes/data-model/field-detail/store/alterations/o2m.ts160export function updateGeneratedRelatedField(updates: StateUpdates, state: State) {
LOW…outes/data-model/field-detail/store/alterations/m2o.ts58export function generateRelatedCollection(updates: StateUpdates) {
130 more matches not shown…
Fake / Example Data107 hits · 111 pts
SeverityFileLineSnippet
LOWAGENTS.md219Replace the placeholder "Lorem ipsum" content with actual details about your changes. Always reference the related issue
LOWapp/src/utils/jwt-payload.test.ts12 name: 'John Doe',
LOWapp/src/utils/validate-item.test.ts78 email: 'test@test.com',
LOWapp/src/utils/validate-item.test.ts91 email: 'test@test.com',
LOWapp/src/views/private/components/collab/utils.test.ts19 expect(result.name).toBe('John Doe');
LOW…s/private/components/comparison/use-comparison.test.ts952 email: 'admin@example.com',
LOWapp/src/routes/setup/form.test.ts49 project_owner: 'admin@example.com',
LOWapp/src/routes/setup/form.test.ts69 project_owner: 'admin@example.com',
LOWapp/src/interfaces/input-rich-text-md/demo.md551. Lorem ipsum dolor sit amet
LOWapp/src/interfaces/input-rich-text-md/demo.md551. Lorem ipsum dolor sit amet
LOWtests/blackbox/tests/db/mail/mail.test.ts56 message: 'Lorem Ipsum',
LOWtests/blackbox/common/config.ts96 ADMIN_EMAIL: 'admin@example.com',
LOWtests/sandbox/src/config.ts155 ADMIN_EMAIL: 'admin@example.com',
LOWtests/sandbox/src/config.ts156 PROJECT_OWNER: 'admin@example.com',
LOWtests/sandbox/src/config.ts205 ADMIN_EMAIL?: 'admin@example.com';
LOWtests/sandbox/src/config.ts206 PROJECT_OWNER?: 'admin@example.com';
LOWtests/e2e/tests/auth/rest.test.ts23 email: 'admin@example.com',
LOWtests/e2e/tests/auth/mcp-oauth-utils.ts7export const adminEmail = 'admin@example.com';
LOWsdk/readme.md62await client.login('admin@example.com', 'd1r3ctu5');
LOW…xtensions-registry/src/modules/account/account.test.ts194 const testCases = ['simple-user', 'user@example.com', 'organization-name', 'user_with_underscores', '123456'];
LOW…registry/src/modules/account/lib/construct-url.test.ts52 const accountId = 'user@example.com';
LOWpackages/composables/src/use-sync.test.ts284 email: 'user@example.com',
LOWpackages/composables/src/use-sync.test.ts363 name: 'John Doe',
LOWpackages/composables/src/use-sync.test.ts413 name: 'John Doe',
LOWpackages/utils/shared/deep-map-filter.test.ts84 _eq: 'John Doe',
LOWpackages/utils/shared/deep-map-filter.test.ts99 _eq: 'John Doe',
LOWpackages/utils/shared/deep-map-filter.test.ts111 _eq: 'John Doe',
LOWpackages/utils/shared/deep-map-filter.test.ts128 _eq: 'John Doe',
LOW.github/pull_request_template.md5- Lorem ipsum dolor sit amet
LOW.github/pull_request_template.md5- Lorem ipsum dolor sit amet
LOW.github/pull_request_template.md11- Lorem ipsum dolor sit amet
LOW.github/pull_request_template.md11- Lorem ipsum dolor sit amet
LOW.github/pull_request_template.md16- Lorem ipsum dolor sit amet
LOW.github/pull_request_template.md16- Lorem ipsum dolor sit amet
LOW.github/pull_request_template.md21- I would like to lorem ipsum
LOW.github/pull_request_template.md22- Special attention should be paid to dolor sit amet
LOWapi/src/websocket/collab/filter-to-fields.test.ts70 _eq: 'John Doe',
LOW…/websocket/collab/payload-permissions-sanitize.test.ts210 { id: 1, title: 'Hello World', author: { id: 10, name: 'John Doe', email: 'john@example.com' } },
LOW…/websocket/collab/payload-permissions-sanitize.test.ts223 author: { id: 10, name: 'John Doe' },
LOW…/websocket/collab/payload-permissions-sanitize.test.ts234 { id: 1, title: 'Hello World', author: { id: 10, name: 'John Doe' } },
LOW…/websocket/collab/payload-permissions-sanitize.test.ts455 { collection: 'authors', item: { id: 10, name: 'John Doe', email: 'john@test.com' } },
LOW…/websocket/collab/payload-permissions-sanitize.test.ts474 name: 'John Doe',
LOWapi/src/auth/drivers/oauth2.test.ts399 vi.spyOn(driver.client, 'userinfo').mockResolvedValue({ sub: '123', email: 'test@test.com' } as any);
LOWapi/src/auth/drivers/oauth2.test.ts432 vi.spyOn(driver.client, 'userinfo').mockResolvedValue({ sub: '123', email: 'test@test.com' } as any);
LOWapi/src/auth/drivers/oauth2.test.ts465 .mockResolvedValue({ sub: '123', email: 'test@test.com' } as any);
LOWapi/src/auth/drivers/oauth2.test.ts495 vi.spyOn(driver.client, 'userinfo').mockResolvedValue({ sub: '123', email: 'test@test.com' } as any);
LOWapi/src/auth/drivers/oauth2.test.ts536 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts578 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts616 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts652 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts755 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts795 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts831 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts871 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts911 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts948 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts980 email: 'test@test.com',
LOWapi/src/auth/drivers/oauth2.test.ts1009 email: 'test@test.com',
LOWapi/src/auth/drivers/openid.test.ts327 claims: () => ({ sub: '123', email: 'test@test.com' }),
LOWapi/src/auth/drivers/openid.test.ts362 vi.spyOn(driver.client!, 'userinfo').mockResolvedValue({ sub: '123', email: 'test@test.com' } as any);
47 more matches not shown…
Over-Commented Block76 hits · 76 pts
SeverityFileLineSnippet
LOWdocker-compose.yml1# This compose file is meant to spin up a copy of supported database vendors,
LOWdocker-compose.yml21# MS SQL: 5103
LOWdocker-compose.yml41# MariaDB:
LOWdocker-compose.yml61# (Make sure to set S3_FORCE_PATH_STYLE to true)
LOWapp/env.d.ts1/// <reference types="vite/client" />
LOWapp/src/lang/translations/et-EE.yaml1---
LOWapp/src/lang/translations/el-GR.yaml1---
LOWapp/src/lang/translations/es-CL.yaml1---
LOWapp/src/lang/translations/it-IT.yaml1---
LOWapp/src/lang/translations/az-AZ.yaml1---
LOWapp/src/lang/translations/hu-HU.yaml1---
LOWapp/src/lang/translations/ar-SA.yaml1---
LOWapp/src/lang/translations/tr-TR.yaml1---
LOWapp/src/lang/translations/sv-SE.yaml1---
LOWapp/src/lang/translations/no-NO.yaml1---
LOWapp/src/lang/translations/pt-PT.yaml1---
LOWapp/src/lang/translations/es-ES.yaml1---
LOWapp/src/lang/translations/ko-KR.yaml1---
LOWapp/src/lang/translations/zh-CN.yaml1---
LOWapp/src/lang/translations/bg-BG.yaml1---
LOWapp/src/lang/translations/ja-JP.yaml1---
LOWapp/src/lang/translations/fa-IR.yaml1---
LOWapp/src/lang/translations/mr-IN.yaml1---
LOWapp/src/lang/translations/da-DK.yaml1---
LOWapp/src/lang/translations/zh-TW.yaml1---
LOWapp/src/lang/translations/fr-FR.yaml1---
LOWapp/src/lang/translations/kmr-TR.yaml1---
LOWapp/src/lang/translations/cs-CZ.yaml1---
LOWapp/src/lang/translations/ca-ES.yaml1---
LOWapp/src/lang/translations/de-DE.yaml1---
LOWapp/src/lang/translations/pt-BR.yaml1---
LOWapp/src/lang/translations/mn-MN.yaml1---
LOWapp/src/lang/translations/pl-PL.yaml1---
LOWapp/src/lang/translations/fr-CA.yaml1---
LOWapp/src/lang/translations/lt-LT.yaml1---
LOWapp/src/lang/translations/uk-UA.yaml1---
LOWapp/src/lang/translations/es-419.yaml1---
LOWapp/src/lang/translations/sk-SK.yaml1---
LOWapp/src/lang/translations/ro-RO.yaml1---
LOWapp/src/lang/translations/hr-HR.yaml1---
LOWapp/src/lang/translations/te-IN.yaml1---
LOWapp/src/lang/translations/uz-UZ.yaml1---
LOWapp/src/lang/translations/eo-UY.yaml1---
LOWapp/src/lang/translations/en-GB.yaml1---
LOWapp/src/lang/translations/en-US.yaml1## Be aware:
LOWapp/src/lang/translations/vi-VN.yaml1---
LOWapp/src/lang/translations/ckb-IR.yaml1---
LOWapp/src/lang/translations/es-MX.yaml1---
LOWapp/src/lang/translations/ka-GE.yaml1---
LOWapp/src/lang/translations/sq-AL.yaml1---
LOWapp/src/lang/translations/ku-TR.yaml1---
LOWapp/src/lang/translations/nl-NL.yaml1---
LOWapp/src/lang/translations/he-IL.yaml1---
LOWapp/src/lang/translations/ru-RU.yaml1---
LOWtests/blackbox/docker-compose.yml1# This composer file is meant to spin up a copy of all supported database vendors and services used in tests.
LOW…kbox/tests/db/routes/items/json-filter-graphql.test.ts81
LOW…kbox/tests/db/routes/items/json-filter-graphql.test.ts101//
LOWtests/e2e/tests/auth/saml.test.ts81 expect(authCookie).toMatch(/SimpleSAMLAuthTokenIdp/);
LOWtests/e2e/tests/auth/saml.test.ts101 // Cookie: authCookie,
LOWtests/e2e/tests/auth/saml.test.ts121 // expect(await acsResponse.json()).toEqual(
16 more matches not shown…
Verbosity Indicators18 hits · 39 pts
SeverityFileLineSnippet
LOWapi/src/ai/files/adapters/google.test.ts35 // Step 1: Start resumable upload
LOWapi/src/ai/files/adapters/google.test.ts46 // Step 2: Upload file data
LOWapi/src/services/mcp-oauth/index.test.ts3039 // Step 1: delete expired unused codes
LOWapi/src/services/mcp-oauth/index.test.ts3041 // Step 2: delete used codes older than 1 hour
LOWapi/src/services/mcp-oauth/index.test.ts3043 // Step 3: expired grants lookup
LOWapi/src/services/mcp-oauth/index.test.ts3045 // Step 4: orphaned grants lookup
LOWapi/src/services/mcp-oauth/index.test.ts3061 // Step 1: expired unused codes
LOWapi/src/services/mcp-oauth/index.test.ts3063 // Step 2: used codes older than 1 hour
LOWapi/src/services/mcp-oauth/index.test.ts3065 // Step 3: expired grants lookup
LOWapi/src/services/mcp-oauth/index.test.ts3067 // Step 4: orphaned grants lookup
LOWapi/src/services/mcp-oauth/index.test.ts3086 // Step 1: expired unused codes
LOWapi/src/services/mcp-oauth/index.test.ts3088 // Step 2: used codes older than 1h
LOWapi/src/services/mcp-oauth/index.test.ts3090 // Step 3: expired grants lookup
LOWapi/src/services/mcp-oauth/index.test.ts3094 // Step 4: orphaned grants lookup
LOWapi/src/services/mcp-oauth/index.test.ts3111 // Step 1: expired unused codes
LOWapi/src/services/mcp-oauth/index.test.ts3113 // Step 2: used codes
LOWapi/src/services/mcp-oauth/index.test.ts3115 // Step 3: expired grants (none)
LOWapi/src/services/mcp-oauth/index.test.ts3117 // Step 4: orphaned grants lookup (left join)
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMapp/src/stores/relations.ts76 // so any ui elements (interfaces) can utilize the full relationship
MEDIUM.github/workflows/claude-code-review.yml65 # Tools for comprehensive PR review
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWtests/blackbox/docker-compose.yml151 # Check if server is responding by querying root DSE (doesn't require specific DN to exist)
Overly Generic Function Names1 hit · 2 pts
SeverityFileLineSnippet
LOWapi/src/utils/stall.ts16 * async function doSomething() {