Diamond comment exclusions in a multi-language mon...
# how-do-i
k
Diamond comment exclusions in a multi-language monorepo At Isometric we have just one monorepo, where most code is either Typescript or Python. Conveniently located in
/typescript
and
/python
subdirs. We have custom Diamond rules for both Typescript and Python – both are file-based. The problem is that Diamond applies irrelevant Typescript rules to Python files, and vice versa. What's the best way to deal with it? (1) Add comment exclusion rule like in the screenshot. Will this work? Is Diamond aware of the name of the custom rules it's evaluating? Is it aware of the locations of the files it reviews? (2) Add to our monorepo a file that matches the glob of Typescript/Python custom rules, explaining where to apply them We have 17 Typescript rule files and 4 Python rules files. I'm not sure how they get concatenated into a single set of instructions. If we do pursue this path, should we strive for the "only apply these rules to those files" disclaimer to appear at the top or bottom? I assume the files get concatenated in alphabetical order, but I'm not sure! (3) Some other way?
p
(If applicable) To help us more clearly understand what you're trying to do, please provide additional details about: - Screenshots / debug logs / list of commands you've tried to run so far - Your workflow - Current state
k
I just tried 1 as I thought this should work better, but curious what's Graphite's guidance here!
p
Hey Konrad! No explicit guidance just yet, but we're working on changes to better support language specific application. For now, you can use exclusions to accomplish what you're after.
k
Ok, great - thank! Fingers crossed this will work well in the meantime