generateRuleDescription() — supabase Function Reference
Architecture documentation for the generateRuleDescription() function in AdvisorRules.utils.tsx from the supabase codebase.
Entity Profile
Dependency Diagram
graph TD be2db34b_0bba_4dab_9cfe_912722c9fdfe["generateRuleDescription()"] a95f4fda_e214_9533_9792_7f0f33d3e87e["CreateRuleSheet()"] a95f4fda_e214_9533_9792_7f0f33d3e87e -->|calls| be2db34b_0bba_4dab_9cfe_912722c9fdfe style be2db34b_0bba_4dab_9cfe_912722c9fdfe fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/studio/components/interfaces/Advisors/AdvisorRules.utils.tsx lines 15–59
export const generateRuleDescription = ({
name,
member,
disabled,
}: {
name?: string
member?: Member
disabled: boolean
}) => {
const lint = lintInfoMap.find((x) => x.name === name)
return (
<>
<p className="font-mono uppercase text-xs text-foreground-lighter">What this rule means:</p>
<p className="!mb-0">
The "{lint?.title}" lint will be{' '}
{disabled
? `ignored for ${!!member ? `this user only` : 'this project'}`
: `visible to ${!!member ? `this user only` : ''}`}
</p>
<p className="text-foreground-light">
{!!member ? (
disabled ? (
<>
Only {member.username ?? member.primary_email} will no longer see this lint in the{' '}
<span className="capitalize">{lint?.category}</span> Advisor, the lint will still be
visible to all other project members
</>
) : (
<>
Only {member.username ?? member.primary_email} will see this lint in the{' '}
<span className="capitalize">{lint?.category}</span> Advisor, the lint will no longer
be visible to all other project members
</>
)
) : (
<>
All project members will no longer see this lint in the{' '}
<span className="capitalize">{lint?.category}</span> Advisor, nor receive notifications
via emails about this lint
</>
)}
</p>
</>
)
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does generateRuleDescription() do?
generateRuleDescription() is a function in the supabase codebase.
What calls generateRuleDescription()?
generateRuleDescription() is called by 1 function(s): CreateRuleSheet.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free