Skip to content

zed validate references incorrect line in warning #537

@tstirrat15

Description

@tstirrat15

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions