Is it possible to add comments to Firebase Firestore rules?

Viewed 2030

I've been unable to find anything in the docs that say whether you can add comments, i.e.

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      // Testing the removal of this line:
      // allow read: if true;
      allow read: if false;
      allow write: if request.auth.uid != null;
    }
  }
}

Is there any info online about the rules syntax? What language is it written in?

1 Answers

The language is documented here. It's called CEL (common expression language). It's pretty clear from what you see that lines containing // are considered like C++ and Java to be comments from the point of // to the end of the line.

Related