zed icon indicating copy to clipboard operation
zed copied to clipboard

`zed validate` references incorrect line in warning

Open tstirrat15 opened this issue 6 months ago • 1 comments

client: zed v0.30.2

Repro:

definition user {}

definition organization {}

definition platform {}

definition resource {
	/** platform is the platform to which the resource belongs */
	relation platform: platform

	/**
	 * organization is the organization to which the resource belongs
	 */
	relation organization: organization

	/** admin is a user that can administer the resource */
	relation admin: user

	/** viewer is a read-only viewer of the resource */
	relation viewer: user

	/** can_admin allows a user to administer the resource */
	permission can_admin = admin + organization->can_admin

	/** grant_roles allows a user to grant roles on the resource */
	permission grant_roles = can_admin

	/** view allows a user to view the datastore */
	permission view = viewer + admin + organization->view

	/** get_resource allows a user to view the resource. */
	permission get_resource = view

	/** update_resource allows a user to update the resource. */
	permission update_resource = can_admin

	/** delete_resource allows a user to delete the resource. */
	permission delete_resource = can_admin
}

Run zed validate on that and you'll see that it's pointing at the wrong lines. This may be related to #530.

tstirrat15 avatar Aug 27 '25 16:08 tstirrat15