func NormalizeAndValidate(path string) (string, error) {
	normalizedPath := Normalize(path)
	if filepath.IsAbs(normalizedPath) {
		return "", NewError(path, errNotRelative)
	}
	// https://github.com/bufbuild/buf/issues/51
	if strings.HasPrefix(normalizedPath, normalizedRelPathJumpContextPrefix) {
		return "", NewError(path, errOutsideContextDir)
	}
	return normalizedPath, nil
}
// NormalizeAndValidate normalizes and validates the given path.
//
// This calls Normalize on the path.
// Returns Error if the path is not relative or jumps context.
// This can be used to validate that paths are valid to use with Buckets.
// The error message is safe to pass to users.
NormalizeAndValidate normalizes and validates the given path.

This calls Normalize on the path.
Returns Error if the path is not relative or jumps context.
This can be used to validate that paths are valid to use with Buckets.
The error message is safe to pass to users.
// NormalizeAndValidate normalizes and validates the given path . // // This calls Normalize on the path . // Returns Error if the path is not relative or jumps context . // This can be used to validate that paths are valid to use with Buckets . // The error message is safe to pass to users .
func NormalizeAndValidate(path string) (string, error) {
	normalizedPath := Normalize(path)
	if filepath.IsAbs(normalizedPath) {
		return "", NewError(path, errNotRelative)
	}
	if strings.HasPrefix(normalizedPath, normalizedRelPathJumpContextPrefix) {
		return "", NewError(path, errOutsideContextDir)
	}
	return normalizedPath, nil
}
func NormalizeAndValidate ( path string ) ( string , error ) { normalizedPath := Normalize ( path ) if filepath . IsAbs ( normalizedPath ) { return " " , NewError ( path , errNotRelative ) } if strings . HasPrefix ( normalizedPath , normalizedRelPathJumpContextPrefix ) { return " " , NewError ( path , errOutsideContextDir ) } return normalizedPath , nil }
NormalizeAndValidate normalizes and validates the given path.
NormalizeAndValidate normalizes and validates the given path .
// https://github.com/bufbuild/buf/issues/51